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

项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
public void handleHeldItemChange(SPacketHeldItemChange packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (InventoryPlayer.isHotbar(packetIn.getHeldItemHotbarIndex()))
    {
        this.gameController.player.inventory.currentItem = packetIn.getHeldItemHotbarIndex();
    }
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
public void handleHeldItemChange(SPacketHeldItemChange packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (InventoryPlayer.isHotbar(packetIn.getHeldItemHotbarIndex()))
    {
        this.gameController.player.inventory.currentItem = packetIn.getHeldItemHotbarIndex();
    }
}
项目:Backmemed    文件:PlayerList.java   
/**
 * sends the players inventory to himself
 */
public void syncPlayerInventory(EntityPlayerMP playerIn)
{
    playerIn.sendContainerToPlayer(playerIn.inventoryContainer);
    playerIn.setPlayerHealthUpdated();
    playerIn.connection.sendPacket(new SPacketHeldItemChange(playerIn.inventory.currentItem));
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
public void handleHeldItemChange(SPacketHeldItemChange packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (InventoryPlayer.isHotbar(packetIn.getHeldItemHotbarIndex()))
    {
        this.gameController.thePlayer.inventory.currentItem = packetIn.getHeldItemHotbarIndex();
    }
}
项目:CustomWorldGen    文件:PlayerList.java   
/**
 * sends the players inventory to himself
 */
public void syncPlayerInventory(EntityPlayerMP playerIn)
{
    playerIn.sendContainerToPlayer(playerIn.inventoryContainer);
    playerIn.setPlayerHealthUpdated();
    playerIn.connection.sendPacket(new SPacketHeldItemChange(playerIn.inventory.currentItem));
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
public void handleHeldItemChange(SPacketHeldItemChange packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (InventoryPlayer.isHotbar(packetIn.getHeldItemHotbarIndex()))
    {
        this.gameController.thePlayer.inventory.currentItem = packetIn.getHeldItemHotbarIndex();
    }
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
void handleHeldItemChange(SPacketHeldItemChange packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
/**
 * Updates which hotbar slot of the player is currently selected
 */
void handleHeldItemChange(SPacketHeldItemChange packetIn);