Started by
FlossenMonster
on
Topic category: Help with Minecraft modding (Java Edition)
Greetings!
As the Title says, I need help adding my custom ClientEventListener to my MainMod.java, I've managed to create a custom java file but I just don't know how to add it to the main class of the mod.
I even tried this:
MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGHEST, ClientEventListener::renderPlayer);
But it didn't work for some reason and I'm now stuck at this point. I hope to get some help!
This is my Main Class
And this is my ClientEventListener Class
You should use subclass of RenderPlayerEvent( in this case RenderPlayerEvent.Pre).
Also remove @SubscribeEvent annotation from renderPlayer method since you’re directly adding listener to event bus.
I did as you said so, but it still doesn't work.
But maybe it has to go somewhere here or something?
You could use custom code mod element and hook into mod loaded event there