Skip to content

Commit

Permalink
use correct data reloader event
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke100000 committed Nov 22, 2024
1 parent d315714 commit 67bda9b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions forge/src/main/java/net/mca/forge/MCAForgeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,31 @@
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;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
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
Expand Down

0 comments on commit 67bda9b

Please sign in to comment.