Answers for ""1.15.2" execute void world tick event"

0

"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
		}
	}	
}
Posted by: Guest on July-25-2021

Code answers related to ""1.15.2" execute void world tick event"

Browse Popular Code Answers by Language