Jump to content

OnItemRightClick firing twice


Recommended Posts

I am creating an item that will perform a function on right click. I am using the OnItemRightClick function of the Item class, but I noticed that when I right click, the event gets fired off twice. What would be causing this?


My code is nothing special at the moment


public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {

	entityplayer.addChatMessage("HELLO WORLD.");
	itemstack.damageItem(1, entityplayer);
	return itemstack;


Any help would be greatly appreciated!

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.