Winter Wonder Land

Winter Wonder Land

698k Downloads

The mod handles every server tick twice (begin and end phase)

Barteks2x opened this issue ยท 0 comments

commented

This method needs to check tick phase

@SubscribeEvent
public static void onWorldTick(WorldTickEvent event) {
WorldServer world = (WorldServer) event.world;
if (world.isRaining()) {
onTickSnowIncrease(world);
} else if (world.provider.isDaytime()) {
onTickSnowDecrease(world);
}
}

This is just doing unnecessary work. In practice, this can add up to as much as 2ms per tick (most of it spent in getPersistentChunkIterable), so minimizing this time would be a good idea.