本文整理汇总了Java中net.minecraft.network.play.server.S44PacketWorldBorder类的典型用法代码示例。如果您正苦于以下问题:Java S44PacketWorldBorder类的具体用法?Java S44PacketWorldBorder怎么用?Java S44PacketWorldBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
S44PacketWorldBorder类属于net.minecraft.network.play.server包,在下文中一共展示了S44PacketWorldBorder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateTimeAndWeatherForPlayer
import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
/**
* 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)));
}
}
示例2: updateTimeAndWeatherForPlayer
import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
@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())));
}
示例3: handleWorldBorder
import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
public void handleWorldBorder(S44PacketWorldBorder packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
packetIn.func_179788_a(this.clientWorldController.getWorldBorder());
}
示例4: handleWorldBorder
import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
public void handleWorldBorder(S44PacketWorldBorder packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
packetIn.func_179788_a(this.clientWorldController.getWorldBorder());
}
示例5: handleWorldBorder
import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
void handleWorldBorder(S44PacketWorldBorder packetIn);