How to use NBT text tag in a GUI?

Started by LeNanic0 on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Feb 2016
Points:
777

User statistics:

  • Modifications: 4
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
How to use NBT text tag in a GUI?

How can I use the new NBT text tag in a GUI?

I need to show some informations that use NBT text tag, but it does not to appear a option in the GUI to show this kind of features, someone can help me?

Active 10 months ago
Joined Jun 2015
Points:
1275

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 544
It depends on your version…
Fri, 03/27/2020 - 19:49

It depends on your version of MCreator. You need to use MCreator 2020.2 and then you create a GUI. In the GUI, you create a text and it'll show u a little arrow next to the text, click on it and select the NBT tag you want (either a entity/player NBT tag so it will be <ENBT:number/...:name> and replace "name" by the name of your NBT tag. If it's a block's NBT tag, it will just be BNBT instead of ENBT

Active 4 years ago
Joined Feb 2016
Points:
777

User statistics:

  • Modifications: 4
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I'm using MCreator 2020.2…
Sat, 03/28/2020 - 12:48

I'm using MCreator 2020.2 and, in the GUI editor, there is no option to use the NBT tag for text, but I solved it with some easy coding

Here is the image of the code modification compared to the original generated by MCreator:
https://drive.google.com/open?id=1bSUVaRLSG8yIfjf5d0l6PGV2sE5rlBPS

I changed the double, getDouble and 0, generated by the code, to String, getString and "" respectively.

 

Active 10 months ago
Joined Jun 2015
Points:
1275

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 544
You don't have this?…
Sat, 03/28/2020 - 12:51

You don't have this? Seriously? Are you sure you're in MCreator 2020.2?
test

Active 4 years ago
Joined Feb 2016
Points:
777

User statistics:

  • Modifications: 4
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I do have it and I am using…
Sun, 03/29/2020 - 00:15

I do have it and I am using MCreator 2020.2, but do you see in some of these fields for BNBT saying that it is for a "String" or a text?
I don't think you understand what I said. But you can do an example to show me how I can get the information in an NBT tag text with these options in the GUI

Active 10 months ago
Joined Jun 2015
Points:
1275

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 544
Well just replace "number"…
Sun, 03/29/2020 - 00:47

Well just replace "number" or "integer" by "string" and see if it works

Active 4 years ago
Joined Feb 2016
Points:
777

User statistics:

  • Modifications: 4
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I tried this and it didn't…
Sun, 03/29/2020 - 01:15

I tried this and it didn't work, so I had to do some coding, but it was simple. Anyway thanks for trying to help me, whenever I ask for information people never help me, but you tried ... thank you very much ^^

Active 6 months ago
Joined Dec 2017
Points:
1034

User statistics:

  • Modifications: 3
  • Forum topics: 50
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
How did you do the Code?
Sun, 03/29/2020 - 12:38

How did you do the Code?