Posted December 3, 20222 yr When I call TickEvent.ClientTickEvent in my Main.java it does nothing but when I call it in other files like utils.MM it works fine @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { System.out.println("tick"); } Im new to moding so this is prolly a dumb question
December 3, 20222 yr there are two ways that method would be called for that event: variant 1 - manual: you called addListener. see ExampleMod.java for example. variant 2 - automagic: if a class is annotated with @Mod.EventBusSubscriber and the event is made static and annotated with @SubscribeEvent, forge will handle everything. use variant 2, but not in main class. Edited December 3, 20222 yr by MFMods
December 3, 20222 yr Author Tysm I did this and also addad a MinecraftForge.EVENT_BUS.register(new _________) forgot that was needed
December 4, 20222 yr hold on. do not do both 1 and 2. do variant 2. annotation on class, annotation on event handler method, make method static. you do not want events to trigger twice.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.