Awesome_Spider Posted November 27, 2014 Share Posted November 27, 2014 So, I have this block that saves it's inventory using NBT. That's all good but I cannot figure out how to return an Item from an unlocalized name (saved in the NBT). Thanks in Advance. Quote Link to comment Share on other sites More sharing options...
austinv11 Posted November 27, 2014 Share Posted November 27, 2014 I'd recommend using the writeToNBT and readFromNBT methods already provided by ItemStacks instead of saving item names Quote Link to comment Share on other sites More sharing options...
austinv11 Posted November 27, 2014 Share Posted November 27, 2014 But if you must use item names, provided that you know the modid for said item, you could use GameRegistry.findItem(modid,name) Quote Link to comment Share on other sites More sharing options...
Awesome_Spider Posted November 27, 2014 Author Share Posted November 27, 2014 Ahh, thanks. Quote Link to comment Share on other sites More sharing options...
LexManos Posted November 27, 2014 Share Posted November 27, 2014 'Unlocalized names' have nothing to do with that registry tho. However, you can get the name for any item through that registry, so use it. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon 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.