Posted July 21, 201312 yr Hey guys , I have a ItemStack for example i want to know if the itemstack contains a block or item. Can anyone help ? http://r1306.hizliresim.com/1b/1/np1mm.png[/img]
July 21, 201312 yr if(stack != null && stack.getItem() != null) { if(stack.getItem() instanceof ItemBlock) { // Block code here } else { // Item code here } }
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.