How to get NBT Tags from Player Inventory and so on?

Started by BIoodheaven on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Mar 2021
Points:
564

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
How to get NBT Tags from Player Inventory and so on?

Hello,

I'm trying to get NBT Tags and their value output to be stored in a String variable to later Substring it and use it elsewhere.
in a /execute Command function. 

This is the NBT function I try to use

NBT

Whenever I try to output a Message with this function it returns just nothing, SelectedItem is a valid NBT Tag for the Player, why do I not get any results, do I miss something? It drives me real crazy. Like you cant even store freshly made Entities / Blocks in the procedures after you created them or am I just stupid?

Active 2 years ago
Joined Aug 2020
Points:
691

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 112
It sounds to me like what…
Wed, 04/21/2021 - 10:44

It sounds to me like what you're doing should work... Could you include more of the code you're trying to make?