Posted May 1, 20187 yr Hi, Is it possible to get the items NBT information while holding it? (when hovering above items there is a text that says how many tags are there inside the item, but I would like to know what's inside those tags)
May 1, 20187 yr ItemStack has a number of methods related to this. Did you look at the type hierarchy to see the list of methods? You can check if it hasTagCompound(), and there is getTagCompound() and a bunch of other related methods. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
May 4, 20187 yr I would recommend taking a look at how Actually Additions does it in the item Tooltip event. They did it really well https://github.com/Ellpeck/ActuallyAdditions/blob/7608a3af3d5184c78b422a095ca42b2c98069462/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java#L74-L172 About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.