Started by
xClaudette7
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I have this weird issue where using any global variable in a item's special information tooltip procedure leaves it blank. Do you know where it could possibly come from?
Edited by xClaudette7 on Fri, 06/19/2026 - 08:03
Let's see the procedure
Well that’s because you are trying to get the variable from a player when your procedure has no access to any player. Either the variable must not be attached to a player or your use a separate procedure to apply the player variable onto an item nbt and then you get that item nbt in your procedure above. Whatever procedure you assign the nbt must be in contact with a player, like inventory/hand tick or in crafted etc
Thanks for your help.
I have a question: If I understand correctly what you're saying, that means I can't display a global variable if the item is in a creative tab or displayed via a mod like Just Enough Items? It must be crafted or in my inventory?
If you want a variable from a player then yes, the item must interact with the player in order to retrieve the variable, at least through mcreator
There may be a way to assign the variable just on hover through custom code
Ok, thank you very much for your explanation and your time.
You're welcome