look, this is what I use and it works just fine.
package archangel.necromancy.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import archangel.necromancy.Necromancy;
import archangel.necromancy.lib.GuiIds;
import archangel.necromancy.lib.Strings;
public class ItemNecronomicon extends ItemNC {
public ItemNecronomicon(int id) {
super(id);
this.setUnlocalizedName(Strings.NECRONOMICON_NAME);
this.setCreativeTab(Necromancy.tabsNecro);
maxStackSize = 1;
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
if (!world.isRemote) {
entityPlayer.openGui(Necromancy.instance, GuiIds.NECRONOMICON, entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
}
return itemStack;
}
}
This pretty much makes it so when this item in hand is right-clicked, it will open a gui defined in my guihandler (GuiIds) class. This ONLY allows you to open the gui, you still need to make a container class, a gui class and set this up in your proxy