Obtaining data from an item. (Tag, ID etc.)

Started by VegaOrionis on

Topic category: Help with MCreator software

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Obtaining data from an item. (Tag, ID etc.)

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. 


https://imgur.com/a/OcH5NfK

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for older versions like that…
Tue, 09/23/2025 - 10:32

for older versions like that I don't either, but why do you need to get this data; maybe there is an easier way.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potions and books have their…
Tue, 09/23/2025 - 10:42

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.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't have a 1.14.4 for…
Tue, 09/23/2025 - 10:51

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()

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't understand the…
Tue, 09/23/2025 - 11:01

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

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, that's not it
Tue, 09/23/2025 - 11:25

Sorry, that's not it

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay yeah that's it, change…
Tue, 09/23/2025 - 11:30

Okay yeah that's it,

change it to this,

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It compiles, but I don't…
Tue, 09/23/2025 - 12:01

It compiles, but I don't know what it's supposed to do or how it works.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hold an item with nbt and…
Tue, 09/23/2025 - 12:03

hold an item with nbt and send a message in chat.

it should print all the item's nbt as a string

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can then either get the…
Tue, 09/23/2025 - 12:04

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

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Either I'm doing something…
Tue, 09/23/2025 - 12:18

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.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
any errors in console? You…
Tue, 09/23/2025 - 12:20

any errors in console?

You can't access those tags without custom code