Skip to content

Instantly share code, notes, and snippets.

@nidefawl
Created February 24, 2013 15:59
Show Gist options
  • Save nidefawl/5024319 to your computer and use it in GitHub Desktop.
Save nidefawl/5024319 to your computer and use it in GitHub Desktop.
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