use of net.tropicraft.core.common.worldgen.village.WorldEventListener in project Tropicraft by Tropicraft.
the class MiscEvents method tickServer.
@SubscribeEvent
public void tickServer(TickEvent.WorldTickEvent event) {
if (event.world.provider instanceof WorldProviderTropicraft) {
WorldDataInstance storage = event.world.getCapability(Tropicraft.WORLD_DATA_INSTANCE, null);
if (storage != null) {
storage.tick();
}
}
if (!lookupDimIDToRegisteredListener.contains(event.world.provider.getDimension())) {
System.out.println("adding world listener for dim " + event.world.provider.getDimension());
event.world.addEventListener(new WorldEventListener());
lookupDimIDToRegisteredListener.add(event.world.provider.getDimension());
}
}
Aggregations