NBT to block of opened GUI

Started by FragantA4sheet on

Topic category: Help with MCreator software

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
NBT to block of opened GUI
Thu, 10/13/2022 - 08:42 (edited)

Hey, I'm trying to create a procedure that ideally applies an NBT to the block that has a GUI.

In essence, how do I apply an NBT to the block that opens the GUI whilst using the GUI open tick trigger? I am trying to NOT put my procedures onto the block tick for performance purposes.

 

Edit* Currently the block at x y z is minecraft:air, how would I target the specific block I require

Edited by FragantA4sheet on Thu, 10/13/2022 - 08:42
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, use whatever if then or…
Sat, 11/12/2022 - 14:32

So, use whatever if then or text fields to decide which nbt data will be changed.

Then, use the preset "search for block in 6x6x6 area" thing. Set the block to whatever block you want your GUI to affect.

Then, add some stuff in the "do" part where it currently just says set "found" to true. Have it instead use the current sx, sy, and sz values to determine where the block is. Use procedures to change the nbt of the block there. It is important to put this in the if do statement where the set "found" to true thing is or the coordinates will be off due to resetting at the bottom of the "search for block" part.

I am assuming that this block will not be used a lot in a small space. If it will be, this will probably not work.