use of com.bluepowermod.network.message.MessageServerTickTime in project BluePower by Qmunity.
the class BPEventHandler method tick.
@SubscribeEvent
public void tick(TickEvent.WorldTickEvent event) {
if (event.phase == TickEvent.Phase.END) {
if (event.world.getWorldTime() % 200 == 0) {
//In case world are going to get their own thread: MinecraftServer.getServer().worldTickTimes.get(event.world.provider.dimensionId)
double tickTime = MathHelper.mean(MinecraftServer.getServer().tickTimeArray) * 1.0E-6D;
BPNetworkHandler.INSTANCE.sendToDimension(new MessageServerTickTime(tickTime), event.world.provider.dimensionId);
}
}
}
Aggregations