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.
There are no errors. Simply sending a message in-game doesn't happen. I also checked it by setting the "right-click on a block" option, and nothing happens either. I'm not familiar with custom codes or how to write them to make them work. I don't have enough knowledge in this area.
welp,
you only need to get the enchantments from books and the effects from potions, right?
try replacing the custom code snippet with,
and then hold an enchanted book
actually, what item did you hold when you did it?
Back then, I was holding the potion. And now a photo of me changing the code and holding the book:
https://imgur.com/a/JdXaSGR
Okay well at least you get something now..
try,
((LivingEntity)entity).getActiveItemStack().getEnchantmentTagList()
No changes, same as before. I don't know if it's the mCreator version or what's going on. Besides, how do you know how to write custom code? And how to address potions?
Okay so, never try programming anything to do with minecraft mods by proxy using purely javadocs lol
I set up a 2020.5 mcreator environment. (omg gradle takes so long in that version xd)
this gets the data, finally x3..
You could probably actually just save that and just it to compare items, since the items you want to compare aren't stackable (potions and enchanted books)
Thanks so much! And sorry for taking up so much of your time.
And how should this be applied to another block, for example, the one you're currently opening? xD
it seems possible, i'm in the process of making a plugin for you. not like nbt edit blocks just getting items in a container.
can't promise anything though x3
that was fun :3,
https://files.catbox.moe/ahhs9u.zip
oh I forgot to implement the container closed trigger lol,
https://files.catbox.moe/shqldj.zip