Started by
LeNanic0
on
Topic category: Help with Minecraft modding (Java Edition)
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?
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
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.
You don't have this? Seriously? Are you sure you're in MCreator 2020.2?
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
Well just replace "number" or "integer" by "string" and see if it works
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 ^^
How did you do the Code?