Posted January 30, 201312 yr Is there a way of finding the name of a block that you right click with an item or from the id returned from world.getBlockId()?
January 30, 201312 yr int blockID = world.getBlockId(x, y, z); if(blockID != 0) //air has no block representation { Block.blocksList[blockID].getBlockName(); } If you want the translated, readable version that appears in Guis: int blockID = world.getBlockId(x, y, z); if(blockID != 0) //air has no block representation { Block.blocksList[blockID].translateBlockName(); }
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.