American2050 Posted August 6, 2016 Share Posted August 6, 2016 I'm using getByNameOrId to get an item from a string, like this: Item myItem = Item.getByNameOrId("minecraft:iron_ingot"); My problem is, how can I do the same, but also consider a metadata, for example for modded items if I need to reference X mod that use ingots and metadatas for the different ones. Quote Link to comment Share on other sites More sharing options...
Choonster Posted August 6, 2016 Share Posted August 6, 2016 Create an ItemStack of that Item with the appropriate metadata. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future. Link to comment Share on other sites More sharing options...
American2050 Posted August 6, 2016 Author Share Posted August 6, 2016 Create an ItemStack of that Item with the appropriate metadata. And then I get the item from the created itemStack? Thanks, gonna try that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.