当前位置: 首页>>代码示例>>Java>>正文


Java S44PacketWorldBorder类代码示例

本文整理汇总了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)));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:ServerConfigurationManager.java

示例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())));
}
 
开发者ID:Cybermaxke,项目名称:Weathers,代码行数:14,代码来源:MixinServerConfigurationManager.java

示例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());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:NetHandlerPlayClient.java

示例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());
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:NetHandlerPlayClient.java

示例5: handleWorldBorder

import net.minecraft.network.play.server.S44PacketWorldBorder; //导入依赖的package包/类
void handleWorldBorder(S44PacketWorldBorder packetIn); 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:2,代码来源:INetHandlerPlayClient.java


注:本文中的net.minecraft.network.play.server.S44PacketWorldBorder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。