diff --git a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java index 21791a885..e1dff4d70 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java +++ b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java @@ -16,8 +16,11 @@ package net.fabricmc.fabric.mixin.resources; +import com.google.common.collect.Lists; import net.fabricmc.fabric.impl.resources.ModResourcePackUtil; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.resource.DefaultClientResourcePack; +import net.minecraft.resource.DefaultResourcePack; import net.minecraft.resource.ReloadableResourceManager; import net.minecraft.resource.ResourcePack; import net.minecraft.resource.ResourceType; @@ -37,6 +40,15 @@ public class MixinMinecraftGame { @Inject(method = "reloadResources()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;reload(Ljava/util/List;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) public void reloadResources(CallbackInfo info, List list) { - ModResourcePackUtil.appendModResourcePacks(list, ResourceType.ASSETS); + List oldList = Lists.newArrayList(list); + list.clear(); + for (int i = 0; i < oldList.size(); i++) { + ResourcePack pack = oldList.get(i); + list.add(pack); + + if (pack instanceof DefaultClientResourcePack) { + ModResourcePackUtil.appendModResourcePacks(list, ResourceType.ASSETS); + } + } } }