From 96e07941aa594ce0219d7f13b77b331c3604b24c Mon Sep 17 00:00:00 2001 From: FirstMegaGame4 <84094287+FirstMegaGame4@users.noreply.github.com> Date: Wed, 27 Dec 2023 15:54:30 +0100 Subject: [PATCH] Fix NamespaceResourceManagerMixin --- .../env/json/mixin/NamespaceResourceManagerMixin.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/firstmegagame4/env/json/mixin/NamespaceResourceManagerMixin.java b/src/main/java/fr/firstmegagame4/env/json/mixin/NamespaceResourceManagerMixin.java index d464ebf..b01c1b1 100644 --- a/src/main/java/fr/firstmegagame4/env/json/mixin/NamespaceResourceManagerMixin.java +++ b/src/main/java/fr/firstmegagame4/env/json/mixin/NamespaceResourceManagerMixin.java @@ -8,7 +8,6 @@ import com.llamalad7.mixinextras.sugar.Share; import com.llamalad7.mixinextras.sugar.ref.LocalRef; import fr.firstmegagame4.env.json.api.EnvJson; -import fr.firstmegagame4.env.json.impl.EnvJsonInitializer; import fr.firstmegagame4.env.json.impl.EnvJsonUtils; import fr.firstmegagame4.env.json.impl.resource.EntryListDuckInterface; import fr.firstmegagame4.env.json.impl.resource.ResourceDuckInterface; @@ -119,8 +118,7 @@ private ResourcePack.ResultConsumer mutateBiConsumer(ResourcePack.ResultConsumer Identifier envJsonIdentifier = EnvJsonUtils.getEnvJsonPath(identifier); ResourceResult resourceResult = envJsonMap.get().get(envJsonIdentifier); if (resourceResult != null && resourceResult.packIndex() >= result.invokePackIndex()) { - Identifier metadataIdentifier = NamespaceResourceManagerMixin.getMetadataPath(identifier); - ResultAccess access = (ResultAccess) results.get(identifier); + ResultAccess access = (ResultAccess) results.get(NamespaceResourceManagerMixin.getMetadataPath(identifier)); InputSupplier metadataSupplier; if (access != null && access.invokePackIndex() >= result.invokePackIndex()) { metadataSupplier = NamespaceResourceManagerMixin.getMetadataSupplier(access.invokeSupplier()); @@ -129,7 +127,7 @@ private ResourcePack.ResultConsumer mutateBiConsumer(ResourcePack.ResultConsumer } ResourceDuckInterface ducked = (ResourceDuckInterface) NamespaceResourceManagerMixin.createResource(result.invokePack(), identifier, result.invokeSupplier(), metadataSupplier); ducked.env_json$initEnvJsonSupplier(EnvJsonUtils.getEnvJsonSupplier(resourceResult.supplier())); - resources.put(metadataIdentifier, (Resource) ducked); + resources.put(identifier, (Resource) ducked); } else { action.accept(identifier, result);