Package pneumaticCraft.common.network

Examples of pneumaticCraft.common.network.PacketUpdateSearchStack


        gui.getButtonList().add(new GuiButton(11, 30, 128, 150, 20, "Move Stat Screen..."));
        if(searchGui != null && player.getCurrentArmor(3) != null) {
            ItemStack searchStack = searchGui.getSearchStack();
            ItemStack helmetStack = ItemPneumaticArmor.getSearchedStack(player.getCurrentArmor(3));
            if(searchStack == null && helmetStack != null || searchStack != null && helmetStack == null || searchStack != null && helmetStack != null && !searchStack.isItemEqual(helmetStack)) {
                NetworkHandler.sendToServer(new PacketUpdateSearchStack(searchStack));
                NBTTagCompound tag = NBTUtil.getCompoundTag(player.getCurrentArmor(3), "SearchStack");
                tag.setInteger("itemID", searchStack != null ? Item.getIdFromItem(searchStack.getItem()) : -1);
                tag.setInteger("itemDamage", searchStack != null ? searchStack.getItemDamage() : -1);
            }
        }
View Full Code Here


    @Override
    public void setInventorySlotContents(int i, ItemStack itemstack){
        NBTTagCompound tag = NBTUtil.getCompoundTag(helmetStack, "SearchStack");
        tag.setInteger("itemID", itemstack != null ? Item.getIdFromItem(itemstack.getItem()) : -1);
        tag.setInteger("itemDamage", itemstack != null ? itemstack.getItemDamage() : -1);
        NetworkHandler.sendToServer(new PacketUpdateSearchStack(itemstack));
    }
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.network.PacketUpdateSearchStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.