use of net.minecraftforge.fml.common.gameevent.TickEvent.WorldTickEvent in project Random-Things by lumien231.
the class RTEventHandler method tick.
@SubscribeEvent
public void tick(TickEvent tickEvent) {
if (tickEvent.type == TickEvent.Type.WORLD && tickEvent.phase == TickEvent.Phase.START) {
World world = ((WorldTickEvent) tickEvent).world;
FestivalHandler.get(world).tick(world);
}
if ((tickEvent.type == TickEvent.Type.CLIENT || tickEvent.type == TickEvent.Type.SERVER) && tickEvent.phase == TickEvent.Phase.END) {
TileEntityRainShield.rainCache.clear();
}
if ((tickEvent.type == TickEvent.Type.CLIENT)) {
clientAnimationCounter++;
}
if (tickEvent instanceof ServerTickEvent) {
ServerModelLibrary.getInstance().tick();
}
if (tickEvent instanceof WorldTickEvent) {
WorldTickEvent worldTickEvent = (WorldTickEvent) tickEvent;
if (worldTickEvent.phase == Phase.END && !worldTickEvent.world.isRemote && worldTickEvent.world.provider.getDimension() == 0) {
RedstoneSignalHandler.getHandler().tick();
}
}
}
Aggregations