/** * Updates the time and weather for the given player to those of the given world */ public void updateTimeAndWeatherForPlayer(EntityPlayerMP playerIn, WorldServer worldIn) { WorldBorder worldborder = this.mcServer.worldServers[0].getWorldBorder(); playerIn.playerNetServerHandler.sendPacket(new S44PacketWorldBorder(worldborder, S44PacketWorldBorder.Action.INITIALIZE)); playerIn.playerNetServerHandler.sendPacket(new S03PacketTimeUpdate(worldIn.getTotalWorldTime(), worldIn.getWorldTime(), worldIn.getGameRules().getBoolean("doDaylightCycle"))); if (worldIn.isRaining()) { playerIn.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(1, 0.0F)); playerIn.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(7, worldIn.getRainStrength(1.0F))); playerIn.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(8, worldIn.getThunderStrength(1.0F))); } }
@Overwrite public void updateTimeAndWeatherForPlayer(EntityPlayerMP playerIn, WorldServer worldIn) { final WorldBorder worldborder = worldIn.getWorldBorder(); playerIn.playerNetServerHandler.sendPacket(new S44PacketWorldBorder(worldborder, S44PacketWorldBorder.Action.INITIALIZE)); playerIn.playerNetServerHandler.sendPacket(new S03PacketTimeUpdate(worldIn.getTotalWorldTime(), worldIn.getWorldTime(), worldIn.getGameRules().getGameRuleBooleanValue("doDaylightCycle"))); final IMixinWorld world = (IMixinWorld) worldIn; playerIn.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(7, getRainStrengthValue(world.getRainStrength()))); playerIn.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(8, getThunderStrengthValue(world.getRainStrength(), world.getDarkness()))); }
public void handleWorldBorder(S44PacketWorldBorder packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); packetIn.func_179788_a(this.clientWorldController.getWorldBorder()); }
void handleWorldBorder(S44PacketWorldBorder packetIn);