package com.hiagg.item;

import com.hiagg.creativetabs.ModTabs;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.WorldSettings.GameType;

public class CurleSpawner extends Item {
	public CurleSpawner() {
		setUnlocalizedName("CurleSpawner");
		setTextureName("hiaggium:CurleSpawner");
		setCreativeTab(ModTabs.tabGear);
	}
	
	@Override
    public boolean onItemUse(ItemStack item, EntityPlayer player, World world, int x, int y, int z, int dim, float p, float ya, float r) {
        player.setGameType(GameType.CREATIVE);
		player.inventory.openInventory();
		player.setGameType(GameType.SURVIVAL);
		return true;
    }

}

@@ -102,16 +102,73 @@
 craft;%0D%0A
+import net.minecraft.client.gui.inventory.GuiInventory;%0D%0A
 import n
@@ -633,25 +633,34 @@
 lic 
-boolean onItemUse
+ItemStack onItemRightClick
 (Ite
@@ -671,16 +671,29 @@
 ck item,
+ World world,
  EntityP
@@ -708,79 +708,38 @@
 ayer
-, World world, int x, int y, int z, int dim, float p, float ya, float r
+) %7B%0D%0A        if(world.isRemote
 ) %7B%0D
@@ -746,16 +746,20 @@
 %0A       
+ %09//
  player.
@@ -795,47 +795,102 @@
 );%0D%0A
-%09%09player.inventory.openInventory();%0D%0A%09%09
+        %09// Minecraft.getMinecraft().displayGuiScreen(new GuiInventory(player));%0D%0A        %09// 
 play
@@ -929,17 +929,31 @@
 );%0D%0A
-%09
+        %7D%0D%0A    
 %09return 
 true
@@ -952,12 +952,12 @@
 urn 
-true
+item
 ;%0D%0A 

Fix Spawner Well, not really.