So I have a block which opens a GUI just fine, but when I implement that into an item it doesn't open! Any ideas?
Item Class:
package mod.Item;
import mod.MagikBase;
import mod.lib.GuiIDs;
import mod.proxy.CommonProxy;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class portableMagik extends Item {
public portableMagik(int par1) {
super(par1);
// TODO Auto-generated constructor stub
}
@Override
public String getTextureFile()
{
return CommonProxy.ITEMS_PNG;
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer entityplayer)
{
entityplayer.openGui(MagikBase.instance, GuiIDs.CRAFTER, entityplayer.worldObj, (int) entityplayer.posX, (int) entityplayer.posY, (int) entityplayer.posZ);
return par1ItemStack;
}
}