// Path: src/main/java/cn/mccraft/chinacraft/init/CCItems.java
// public interface CCItems {
//     Item.ToolMaterial BRONZE_TOOL_MATERIAL = EnumHelper.addToolMaterial("BRONZE", 2, 232, 5.0F, 1.75F, 9);
// 
//     @RegItem(value = {"copper", "ingot"}, oreDict = {"ingotCopper"})
//     ItemCCBase COPPER_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"tin", "ingot"}, oreDict = {"ingotTin"})
//     ItemCCBase TIN_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"bronze", "ingot"}, oreDict = {"ingotBronze"})
//     ItemCCBase BRONZE_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"silver", "ingot"}, oreDict = {"ingotSilver"})
//     ItemCCBase SILVER_INGOT = new ItemCCBase();
// 
//     @RegItem({"bronze", "pickaxe"})
//     Item BRONZE_PICKAXE = new ItemCCPickaxe(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "axe"})
//     Item BRONZE_AXE = new ItemCCAxe(BRONZE_TOOL_MATERIAL, 8.0F, -3.15F);
// 
//     @RegItem({"bronze", "shovel"})
//     Item BRONZE_SHOVEL = new ItemCCSpade(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "sword"})
//     Item BRONZE_SWORD = new ItemCCSword(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "hoe"})
//     Item BRONZE_HOE = new ItemCCHoe(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"black","brick"})
//     ItemCCBase BLACK_BRICK = new ItemCCBase();
// 
//     @RegItem({"red", "packet"})
//     ItemCCRedPacket RED_PACKET = new ItemCCRedPacket();
// 
//     @RegItem({"bamboo","item"})
//     ItemCCBase BAMBOO_ITEM = new ItemCCBase();
// 
//     @RegItem({"peeled","bamboo","item"})
//     ItemCCBase PEELED_BAMBOO_ITEM = new ItemCCBase();
// 
//     @RegItem({"art","knife"})
//     ItemCCArtKnife ART_KNIFE = new ItemCCArtKnife();
// 
//     @RegItem({"silk"})
//     ItemCCSilk SILK = new ItemCCSilk();
// 
//     @RegItem(value = {"record", "volunteer", "march"}, oreDict = {"record"})
//     ItemCCRecord RECORD_VOLUNTEER_MARCH = new ItemCCRecord("volunteerMarch", CCSounds.VOLUNTEER_MARCH);
// 
//     @RegItem(value = {"record", "spring", "festival"}, oreDict = {"record"})
//     ItemCCRecord RECORD_SPRING_FESTIVAL = new ItemCCRecord("springFestival", CCSounds.SPRING_FESTIVAL);
// 
//     @RegItem(value = {"record", "mountain", "fall"}, oreDict = {"record"})
//     ItemCCRecord RECORD_MOUNTAIN_FALL = new ItemCCRecord("mountainFall", CCSounds.MOUNTAIN_FALL);
// 
//     @RegItem(value = {"record", "plum", "blossom"}, oreDict = {"record"})
//     ItemCCRecord RECORD_PLUM_BLOSSOM = new ItemCCRecord("plumBlossom", CCSounds.PLUM_BLOSSOM);
// }


import cn.mccraft.chinacraft.init.CCItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryBasic;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import javax.annotation.Nonnull;
                        return false;
                    }
                });
            } else {
                this.addSlotToContainer(new Slot(player.inventory, var3, 8 + var3 * 18, 142));
            }
        }
    }

    private void load(EntityPlayer player){
        //不知道有没有用的防刷物品措施
        if(player.getEntityWorld().isRemote) return;

        if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("item")) {
            NBTTagCompound itemnbt = itemStack.getTagCompound().getCompoundTag("item");
            //不知道有没有用的防刷物品措施
            itemStack.getTagCompound().setTag("item",new NBTTagCompound());
            ItemStack item = new ItemStack(itemnbt);
            /*if (item != null && FeatureConfig.ItemBombInRedPackerExplosion && item.getItem() == ChinaCraft.bomb) {
                //炸弹自爆
                player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, 1.5F, true);
                getSlot(0).putStack(null);
            } else*/
            getSlot(0).putStack(item);
        }
    }

    @Override
    public void onContainerClosed(EntityPlayer p_75134_1_) {
        super.onContainerClosed(p_75134_1_);
// Path: src/main/java/cn/mccraft/chinacraft/init/CCItems.java
// public interface CCItems {
//     Item.ToolMaterial BRONZE_TOOL_MATERIAL = EnumHelper.addToolMaterial("BRONZE", 2, 232, 5.0F, 1.75F, 9);
// 
//     @RegItem(value = {"copper", "ingot"}, oreDict = {"ingotCopper"})
//     ItemCCBase COPPER_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"tin", "ingot"}, oreDict = {"ingotTin"})
//     ItemCCBase TIN_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"bronze", "ingot"}, oreDict = {"ingotBronze"})
//     ItemCCBase BRONZE_INGOT = new ItemCCBase();
// 
//     @RegItem(value = {"silver", "ingot"}, oreDict = {"ingotSilver"})
//     ItemCCBase SILVER_INGOT = new ItemCCBase();
// 
//     @RegItem({"bronze", "pickaxe"})
//     Item BRONZE_PICKAXE = new ItemCCPickaxe(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "axe"})
//     Item BRONZE_AXE = new ItemCCAxe(BRONZE_TOOL_MATERIAL, 8.0F, -3.15F);
// 
//     @RegItem({"bronze", "shovel"})
//     Item BRONZE_SHOVEL = new ItemCCSpade(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "sword"})
//     Item BRONZE_SWORD = new ItemCCSword(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"bronze", "hoe"})
//     Item BRONZE_HOE = new ItemCCHoe(BRONZE_TOOL_MATERIAL);
// 
//     @RegItem({"black","brick"})
//     ItemCCBase BLACK_BRICK = new ItemCCBase();
// 
//     @RegItem({"red", "packet"})
//     ItemCCRedPacket RED_PACKET = new ItemCCRedPacket();
// 
//     @RegItem({"bamboo","item"})
//     ItemCCBase BAMBOO_ITEM = new ItemCCBase();
// 
//     @RegItem({"peeled","bamboo","item"})
//     ItemCCBase PEELED_BAMBOO_ITEM = new ItemCCBase();
// 
//     @RegItem({"art","knife"})
//     ItemCCArtKnife ART_KNIFE = new ItemCCArtKnife();
// 
//     @RegItem({"silk"})
//     ItemCCSilk SILK = new ItemCCSilk();
// 
//     @RegItem(value = {"record", "volunteer", "march"}, oreDict = {"record"})
//     ItemCCRecord RECORD_VOLUNTEER_MARCH = new ItemCCRecord("volunteerMarch", CCSounds.VOLUNTEER_MARCH);
// 
//     @RegItem(value = {"record", "spring", "festival"}, oreDict = {"record"})
//     ItemCCRecord RECORD_SPRING_FESTIVAL = new ItemCCRecord("springFestival", CCSounds.SPRING_FESTIVAL);
// 
//     @RegItem(value = {"record", "mountain", "fall"}, oreDict = {"record"})
//     ItemCCRecord RECORD_MOUNTAIN_FALL = new ItemCCRecord("mountainFall", CCSounds.MOUNTAIN_FALL);
// 
//     @RegItem(value = {"record", "plum", "blossom"}, oreDict = {"record"})
//     ItemCCRecord RECORD_PLUM_BLOSSOM = new ItemCCRecord("plumBlossom", CCSounds.PLUM_BLOSSOM);
// }


// Path: src/main/java/cn/mccraft/chinacraft/inventory/ContainerRedPacket.java
import cn.mccraft.chinacraft.init.CCItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryBasic;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import javax.annotation.Nonnull;

                        return false;
                    }
                });
            } else {
                this.addSlotToContainer(new Slot(player.inventory, var3, 8 + var3 * 18, 142));
            }
        }
    }

    private void load(EntityPlayer player){
        //不知道有没有用的防刷物品措施
        if(player.getEntityWorld().isRemote) return;

        if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("item")) {
            NBTTagCompound itemnbt = itemStack.getTagCompound().getCompoundTag("item");
            //不知道有没有用的防刷物品措施
            itemStack.getTagCompound().setTag("item",new NBTTagCompound());
            ItemStack item = new ItemStack(itemnbt);
            /*if (item != null && FeatureConfig.ItemBombInRedPackerExplosion && item.getItem() == ChinaCraft.bomb) {
                //炸弹自爆
                player.worldObj.createExplosion(player, player.posX, player.posY, player.posZ, 1.5F, true);
                getSlot(0).putStack(null);
            } else*/
            getSlot(0).putStack(item);
        }
    }

    @Override
    public void onContainerClosed(EntityPlayer p_75134_1_) {
        super.onContainerClosed(p_75134_1_);
        if (p_75134_1_.getHeldItemMainhand() == ItemStack.EMPTY || !p_75134_1_.getHeldItemMainhand().getItem().equals(CCItems.RED_PACKET)) return;