本文整理汇总了Java中net.minecraft.network.play.server.S0APacketUseBed类的典型用法代码示例。如果您正苦于以下问题:Java S0APacketUseBed类的具体用法?Java S0APacketUseBed怎么用?Java S0APacketUseBed使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
S0APacketUseBed类属于net.minecraft.network.play.server包,在下文中一共展示了S0APacketUseBed类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: trySleep
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
public EntityPlayer.EnumStatus trySleep(BlockPos bedLocation)
{
EntityPlayer.EnumStatus entityplayer$enumstatus = super.trySleep(bedLocation);
if (entityplayer$enumstatus == EntityPlayer.EnumStatus.OK)
{
Packet packet = new S0APacketUseBed(this, bedLocation);
this.getServerForPlayer().getEntityTracker().sendToAllTrackingEntity(this, packet);
this.playerNetServerHandler.setPlayerLocation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.playerNetServerHandler.sendPacket(packet);
}
return entityplayer$enumstatus;
}
示例2: sleepInBedAt
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* puts player to sleep on specified bed if possible
*/
public EntityPlayer.EnumStatus sleepInBedAt(int par1, int par2, int par3)
{
EntityPlayer.EnumStatus var4 = super.sleepInBedAt(par1, par2, par3);
if (var4 == EntityPlayer.EnumStatus.OK)
{
S0APacketUseBed var5 = new S0APacketUseBed(this, par1, par2, par3);
this.getServerForPlayer().getEntityTracker().func_151247_a(this, var5);
this.playerNetServerHandler.setPlayerLocation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.playerNetServerHandler.sendPacket(var5);
}
return var4;
}
示例3: sleepInBedAt
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
public EntityPlayer.EnumStatus sleepInBedAt(int p_71018_1_, int p_71018_2_, int p_71018_3_)
{
EntityPlayer.EnumStatus enumstatus = super.sleepInBedAt(p_71018_1_, p_71018_2_, p_71018_3_);
if (enumstatus == EntityPlayer.EnumStatus.OK)
{
S0APacketUseBed s0apacketusebed = new S0APacketUseBed(this, p_71018_1_, p_71018_2_, p_71018_3_);
this.getServerForPlayer().getEntityTracker().func_151247_a(this, s0apacketusebed);
this.playerNetServerHandler.setPlayerLocation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.playerNetServerHandler.sendPacket(s0apacketusebed);
}
return enumstatus;
}
示例4: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* Retrieves the player identified by the packet, puts him to sleep if possible (and flags whether all players are
* asleep)
*/
public void handleUseBed(S0APacketUseBed packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
packetIn.getPlayer(this.clientWorldController).trySleep(packetIn.getBedPosition());
}
示例5: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* Retrieves the player identified by the packet, puts him to sleep if possible
* (and flags whether all players are asleep)
*/
public void handleUseBed(S0APacketUseBed packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
packetIn.getPlayer(this.clientWorldController).trySleep(packetIn.getBedPosition());
}
示例6: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* Retrieves the player identified by the packet, puts him to sleep if possible (and flags whether all players are
* asleep)
*/
public void handleUseBed(S0APacketUseBed p_147278_1_)
{
p_147278_1_.func_149091_a(this.clientWorldController).sleepInBedAt(p_147278_1_.func_149092_c(), p_147278_1_.func_149090_d(), p_147278_1_.func_149089_e());
}
示例7: useBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
@Override
public Packet useBed(Player player, int x, int y, int z) {
return (Packet) new S0APacketUseBed((EntityPlayer) player, new BlockPos(x, y, z));
}
示例8: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
public void handleUseBed(S0APacketUseBed p_147278_1_)
{
p_147278_1_.func_149091_a(this.clientWorldController).sleepInBedAt(p_147278_1_.func_149092_c(), p_147278_1_.func_149090_d(), p_147278_1_.func_149089_e());
}
示例9: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* Retrieves the player identified by the packet, puts him to sleep if possible (and flags whether all players are
* asleep)
*/
void handleUseBed(S0APacketUseBed packetIn);
示例10: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
/**
* Retrieves the player identified by the packet, puts him to sleep if possible (and flags whether all players are
* asleep)
*/
void handleUseBed(S0APacketUseBed var1);
示例11: handleUseBed
import net.minecraft.network.play.server.S0APacketUseBed; //导入依赖的package包/类
void handleUseBed(S0APacketUseBed p_147278_1_);