Started by
VegaOrionis
on
Topic category: Help with MCreator software
Hello, I'd like to obtain specific item data, specifically the tag. Using the "/data entity" command, I can also see information about items in my inventory and their data. I'd like to obtain this data in MCreator for a specific item, but I don't know how to extract it. I've tried various combinations, but I must be doing something wrong... I'm not getting any feedback when testing.
for older versions like that I don't either, but why do you need to get this data; maybe there is an easier way.
Potions and books have their own individual tag. I want to retrieve this data using a procedure or other means so that the procedure can detect such an item in any player or block slot.
I don't have a 1.14.4 for environment set up so I'm just going off of online javadocs but what does this send,
((LivingEntity)entity).getActiveItemStack().getTag().toString()
I don't understand the question and I don't understand what this command is supposed to do - it gives me a compilation error.
https://imgur.com/a/iIYjXzQ
show the log
https://imgur.com/PsuVMPF
Sorry, that's not it
https://imgur.com/a/V0cDHwh
Okay yeah that's it,
change it to this,
It compiles, but I don't know what it's supposed to do or how it works.
hold an item with nbt and send a message in chat.
it should print all the item's nbt as a string
You can then either get the tags you want with more custom code or just split it with the text operator blocks.. (if they even existed in that version of mcreator lol)
If you want to use more custom code I can try and help you get what you want
Either I'm doing something wrong or nothing happens. All I need is to extract information about a specific item so I can reference it in the future if I find it in a specific slot. I'm talking about potions and books. They have their own unique tag, but I don't know how to access it.
any errors in console?
You can't access those tags without custom code