Posted January 5, 20178 yr I have an ItemStack with item and damage value and I need the IBlockState of it. Is there a way?
January 5, 20178 yr Author I know that, but the itemStack has metaData and itemDamage. And I want to know if I'm able to construct an IBlockstate with the help of that
January 5, 20178 yr I think if I understand correctly, you have a ItemStack and want to get a BlockState from that. I would probably do this: ItemStack stack = new ItemStack(SOMEBLOCK, 1, META); IBlockState state = Block.getBlockFromItem(stack.getItem()).getStateFromMeta(stack.getMetadata()); Beware that this will fail if the Item is not a ItemBlock
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.