"1.15.2" execute void world tick event
public MyMod()
{
final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBus.addListener(this::setup);
MinecraftForge.EVENT_BUS.register(new TestClass());
MinecraftForge.EVENT_BUS.register(this);
}
public class TestClass {
@SubscribeEvent
public void onWorldTick(TickEvent.WorldTickEvent event) {
if (event.phase == TickEvent.Phase.END) {
//do stuff
}
}
}