A variable specified to a block/entity

Started by LercDsgn3 on Tue, 02/02/2021 - 17:38

Topic category: Help with MCreator software

Last seen on 21:47, 1. Jan 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
A variable specified to a block/entity
Tue, 02/02/2021 - 17:38

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)

Last seen on 05:31, 18. May 2022
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 21:47, 1. Jan 2022
Joined Jan 2021
Points:

User statistics:

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

Oh, thanks. I'll try doing that.

Last seen on 21:47, 1. Jan 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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