A variable specified to a block/entity

Started by LercDsgn3 on

Topic category: Help with MCreator software

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A variable specified to a block/entity

Like command blocks store the text inside them, I want a block/entity to save the text value when user enters something in a textbox and exits, and show it back when they enter again. You can think it as a chest but instead of items, it stores the value. I think NBT tags could be used, but they don't store text. (I didn't use them too much, please tell if they can)

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
NBT tags can store text…
Sun, 02/21/2021 - 09:24

NBT tags can store text. Make sure the block you made is a 'tile entity' (you have to tick a box in the block creation menu, in the 'tile entity' section). Then you can use the 'set text NBT [nbt name] blah blah blah if tile entity" and the same thing for 'get' version. this way the block will store the text value as long as it isnt destroyed.

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, thanks. I'll try doing…
Sat, 02/27/2021 - 18:01

Oh, thanks. I'll try doing that.

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to store tags…
Sat, 02/27/2021 - 18:03

Is there a way to store tags even when it's destroyed? So it will keep it's attributes after being placed backs