Started by
MelodyAutumn
on
Topic category: Help with Minecraft modding (Java Edition)
like the title says, i have a block in my mod that has text nbt (storedCommand) that is given when a player types something into a text field and presses a button to save it as the nbt value, but it resets to simply nothing whenever i leave and re-enter the world. i don't have the nbt set anywhere unless that button is pressed so i don't know what's going on. any help is appreciated, cuz this is kinda a big issue
did you make a block "Tile Entity?"
I meant: Did you use the print string text procedure and use it to print it as NBT data?
it's set as a tile entity, but no, i didn't use the print block
here's my code, and the only time the nbt is defined (it runs when the button in the gui is pushed) and also the gui
I see what's going on, The detector is not bound to the current block, therefore it acts like an Air block instead.
In order to store it's data, you need "X" "Y" and "Z" coordinates along with the sting value.
Did you put the coords on the "If" Statement?
GUI text field text is client-side only therefore cannot be accessed from the server and saved.
Hmm, I didn't know that, Thanks.