Created
February 24, 2013 15:59
-
-
Save nidefawl/5024319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!par3World.isRemote) { | |
int blockId = par3World.getBlockId(par4, par5, par6); | |
if(blockId != RGBWool.WoolID){ | |
System.out.println("Clicked Non-Wool"); | |
par2EntityPlayer.openGui(RGBWool.instance, 0, par3World, par4, par5, par6); | |
return true; | |
} else { | |
NBTTagCompound nbt = par1ItemStack.getTagCompound(); | |
if (nbt != null) { | |
TileEntity tEnt = par3World.getBlockTileEntity(par4, par5, par6); | |
if (tEnt instanceof TileEntityWool) { | |
TileEntityWool wool = (TileEntityWool) tEnt; | |
wool.Red = nbt.getInteger("Red"); | |
wool.Green = nbt.getInteger("Green"); | |
wool.Blue = nbt.getInteger("Blue"); | |
par3World.markBlockForUpdate(par4, par5, par6); | |
} | |
} | |
System.out.println("Clicked Wool"); | |
} | |
return false; | |
} | |
return true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment