Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
- {
- if (world.getTileEntity(x, y, z) instanceof TileEntityPylon)
- {
- if (stack.stackTagCompound != null && !world.isRemote)
- {
- int red = stack.stackTagCompound.getInteger("colorRed");
- int green = stack.stackTagCompound.getInteger("colorGreen");
- int blue = stack.stackTagCompound.getInteger("colorBlue");
- boolean isFirstTimeUse = stack.stackTagCompound.getBoolean("isFirstTimeUse");
- if (isFirstTimeUse)
- {
- stack.stackTagCompound.setInteger("colorRed", tePylon.red);
- stack.stackTagCompound.setInteger("colorGreen", tePylon.green);
- stack.stackTagCompound.setInteger("colorBlue", tePylon.blue);
- stack.stackTagCompound.setBoolean("isFirstTimeUse", false);
- return true;
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment