Jump to content

Get Block name/type from ID


KelMai
 Share

Recommended Posts

This is probably a very stupid question but I just don't find anything:

 

I have an Item. In onItemUse() I'd like to get the Name of the block that was clicked. I can get the Block ID with world.getBlockId(x, y, z).

But how do i get the block's name? The unlocalizedName or even better the one I set with  LanguageRegistry.addName().

 

I've been staring at code and Forum posts for over an hour now but haven't found anything...

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

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