From 67bda9bc737aced178b7d9d48810fa33411a35ba Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Fri, 22 Nov 2024 22:27:37 +0100 Subject: [PATCH] use correct data reloader event --- .../main/java/net/mca/forge/MCAForgeClient.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/forge/src/main/java/net/mca/forge/MCAForgeClient.java b/forge/src/main/java/net/mca/forge/MCAForgeClient.java index 6bdb24f292..087b3e3174 100644 --- a/forge/src/main/java/net/mca/forge/MCAForgeClient.java +++ b/forge/src/main/java/net/mca/forge/MCAForgeClient.java @@ -13,7 +13,6 @@ import net.mca.entity.EntitiesMCA; import net.mca.resources.ApiReloadListener; import net.mca.resources.Supporters; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.item.ModelPredicateProviderRegistry; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.RenderLayers; @@ -21,25 +20,24 @@ import net.minecraft.client.render.entity.EntityRenderers; import net.minecraft.client.render.entity.VillagerEntityRenderer; import net.minecraft.client.render.entity.ZombieVillagerEntityRenderer; -import net.minecraft.resource.ReloadableResourceManagerImpl; import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.RegisterClientReloadListenersEvent; import net.minecraftforge.client.event.RegisterKeyMappingsEvent; import net.minecraftforge.client.event.RegisterParticleProvidersEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; -import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent; @Mod.EventBusSubscriber(modid = MCA.MOD_ID, value = Dist.CLIENT, bus = Bus.MOD) public final class MCAForgeClient { @SubscribeEvent - public static void data(FMLConstructModEvent event) { + public static void data(RegisterClientReloadListenersEvent event) { new ClientProxyImpl(); - ((ReloadableResourceManagerImpl) MinecraftClient.getInstance().getResourceManager()).registerReloader(new MCAScreens()); - ((ReloadableResourceManagerImpl) MinecraftClient.getInstance().getResourceManager()).registerReloader(new ColorPaletteLoader()); - ((ReloadableResourceManagerImpl) MinecraftClient.getInstance().getResourceManager()).registerReloader(new Supporters()); - ((ReloadableResourceManagerImpl) MinecraftClient.getInstance().getResourceManager()).registerReloader(new ApiReloadListener()); + event.registerReloadListener(new MCAScreens()); + event.registerReloadListener(new ColorPaletteLoader()); + event.registerReloadListener(new Supporters()); + event.registerReloadListener(new ApiReloadListener()); } @SubscribeEvent