July 10, 201510 yr In my item's onItemUse method, some data about the tile entity that the player has right clicked on while sneaking is saved to the itemstack. If a player right clicks the item while sneaking and not looking at anything, this data is cleared. However when the player sneak-right clicks the tile entity, the onItemUse method is called then onItemRightClick is called. I want to stop the later from happening. Is this controlled by the return value of onItemUse or something else? I like trains.
July 11, 201510 yr Author What? I don't want to clear the saved data immediately after it's been set. That defeats the purpose of the item. I like trains.
July 11, 201510 yr Author I changed it to return true in the block where data is saved to the stack, onItemRightClick is still being called. I like trains.
July 11, 201510 yr Author @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float p_77648_8_, float p_77648_9_, float p_77648_10_) { if (world.isRemote) return true; There we go. It works now. I like trains.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.