Java 类net.minecraft.network.play.server.S44PacketWorldBorder 实例源码

项目:DecompiledMinecraft    文件:ServerConfigurationManager.java   
/**
 * 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)));
    }
}
项目:DecompiledMinecraft    文件:ServerConfigurationManager.java   
/**
 * 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)));
    }
}
项目:BaseClient    文件:ServerConfigurationManager.java   
/**
 * 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)));
    }
}
项目:BaseClient    文件:ServerConfigurationManager.java   
/**
 * 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)));
    }
}
项目:Weathers    文件:MixinServerConfigurationManager.java   
@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())));
}
项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
public void handleWorldBorder(S44PacketWorldBorder packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    packetIn.func_179788_a(this.clientWorldController.getWorldBorder());
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleWorldBorder(S44PacketWorldBorder packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    packetIn.func_179788_a(this.clientWorldController.getWorldBorder());
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleWorldBorder(S44PacketWorldBorder packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    packetIn.func_179788_a(this.clientWorldController.getWorldBorder());
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleWorldBorder(S44PacketWorldBorder packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
void handleWorldBorder(S44PacketWorldBorder packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleWorldBorder(S44PacketWorldBorder packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
void handleWorldBorder(S44PacketWorldBorder packetIn);