// Path: src/main/java/cn/mccraft/chinacraft/common/ChinaCraft.java
// @Mod(modid = ChinaCraft.MODID, name = ChinaCraft.NAME, version = ChinaCraft.VERSION, dependencies = "required-after:biomesoplenty")
// public final class ChinaCraft {
//     public static final String MODID = "chinacraft";
//     public static final String NAME = "ChinaCraft 2";
//     public static final String VERSION = "0.0.1";
// 
//     @SidedProxy(clientSide = "cn.mccraft.chinacraft.client.ClientProxy", serverSide = "cn.mccraft.chinacraft.common.CommonProxy")
//     private static CommonProxy proxy;
// 
//     @Mod.Instance(ChinaCraft.MODID)
//     private static ChinaCraft instance;
// 
//     private CCEventHandler eventHandler;
// 
//     private static SimpleNetworkWrapper network;
// 
//     private static final Logger LOGGER = LogManager.getLogger(MODID);
// 
//     private JsonSettings settings;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent event) {
//         settings = new JsonSettings(event.getModConfigurationDirectory(), "config");
//         proxy.preInit(event);
//         eventHandler = new CCEventHandler();
//     }
// 
//     @EventHandler
//     public void init(FMLInitializationEvent event) {
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
//         network.registerMessage(new RedPacketMessage.Handler(), RedPacketMessage.class,0, Side.SERVER);
// 
//         NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 
//         proxy.init(event);
//     }
// 
//     @EventHandler
//     public void postInit(FMLPostInitializationEvent event) {
//         proxy.postInit(event);
//     }
// 
//     @EventHandler
//     public void loadComplete(FMLLoadCompleteEvent event) {
//         proxy.loadComplete(event);
//     }
// 
//     public JsonSettings getSettings() {
//         return settings;
//     }
// 
//     public CCEventHandler getEventHandler() {
//         return eventHandler;
//     }
// 
//     public static Logger getLogger() {
//         return LOGGER;
//     }
// 
//     public static ChinaCraft getInstance() {
//         return instance;
//     }
// 
//     public static SimpleNetworkWrapper getNetwork() {
//         return network;
//     }
// 
//     public static CommonProxy getProxy() {
//         return proxy;
//     }
// }
// 
// Path: src/main/java/cn/mccraft/chinacraft/common/gui/EnumGuiType.java
// public enum EnumGuiType {
//     RED_PACKET,
//     CRUSHER,
//     SILKWORM_FRAME
// }


import cn.mccraft.chinacraft.common.ChinaCraft;
import cn.mccraft.chinacraft.common.gui.EnumGuiType;import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
package cn.mccraft.chinacraft.item;



public class ItemCCRedPacket extends ItemCCBase {

    public ItemCCRedPacket(){
        setMaxStackSize(1);
    }

    @Nonnull
    @Override
    public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
        BlockPos pos = playerIn.getPosition();
// Path: src/main/java/cn/mccraft/chinacraft/common/ChinaCraft.java
// @Mod(modid = ChinaCraft.MODID, name = ChinaCraft.NAME, version = ChinaCraft.VERSION, dependencies = "required-after:biomesoplenty")
// public final class ChinaCraft {
//     public static final String MODID = "chinacraft";
//     public static final String NAME = "ChinaCraft 2";
//     public static final String VERSION = "0.0.1";
// 
//     @SidedProxy(clientSide = "cn.mccraft.chinacraft.client.ClientProxy", serverSide = "cn.mccraft.chinacraft.common.CommonProxy")
//     private static CommonProxy proxy;
// 
//     @Mod.Instance(ChinaCraft.MODID)
//     private static ChinaCraft instance;
// 
//     private CCEventHandler eventHandler;
// 
//     private static SimpleNetworkWrapper network;
// 
//     private static final Logger LOGGER = LogManager.getLogger(MODID);
// 
//     private JsonSettings settings;
// 
//     @EventHandler
//     public void preInit(FMLPreInitializationEvent event) {
//         settings = new JsonSettings(event.getModConfigurationDirectory(), "config");
//         proxy.preInit(event);
//         eventHandler = new CCEventHandler();
//     }
// 
//     @EventHandler
//     public void init(FMLInitializationEvent event) {
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
//         network.registerMessage(new RedPacketMessage.Handler(), RedPacketMessage.class,0, Side.SERVER);
// 
//         NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 
//         proxy.init(event);
//     }
// 
//     @EventHandler
//     public void postInit(FMLPostInitializationEvent event) {
//         proxy.postInit(event);
//     }
// 
//     @EventHandler
//     public void loadComplete(FMLLoadCompleteEvent event) {
//         proxy.loadComplete(event);
//     }
// 
//     public JsonSettings getSettings() {
//         return settings;
//     }
// 
//     public CCEventHandler getEventHandler() {
//         return eventHandler;
//     }
// 
//     public static Logger getLogger() {
//         return LOGGER;
//     }
// 
//     public static ChinaCraft getInstance() {
//         return instance;
//     }
// 
//     public static SimpleNetworkWrapper getNetwork() {
//         return network;
//     }
// 
//     public static CommonProxy getProxy() {
//         return proxy;
//     }
// }
// 
// Path: src/main/java/cn/mccraft/chinacraft/common/gui/EnumGuiType.java
// public enum EnumGuiType {
//     RED_PACKET,
//     CRUSHER,
//     SILKWORM_FRAME
// }


// Path: src/main/java/cn/mccraft/chinacraft/item/ItemCCRedPacket.java
import cn.mccraft.chinacraft.common.ChinaCraft;
import cn.mccraft.chinacraft.common.gui.EnumGuiType;import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import javax.annotation.Nonnull;

package cn.mccraft.chinacraft.item;



public class ItemCCRedPacket extends ItemCCBase {

    public ItemCCRedPacket(){
        setMaxStackSize(1);
    }

    @Nonnull
    @Override
    public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
        BlockPos pos = playerIn.getPosition();
        playerIn.openGui(ChinaCraft.getInstance(), EnumGuiType.RED_PACKET.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ());