Problems with custom text NBT

Started by Santa Matt on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problems with custom text NBT

I created a block to use as a simple teleporter. In part for a world I'm running and in part to learn. 

Sneak-right click opens a GUI where you can set the destination XYZ. Right click teleports you. The X, Y and Z coordinates are kept in custom text NBT fields on the block. At least that is the plan. But it appears the NBT's are on the player. as all teleport blocks go to the same place which is the last one saved. Attached find my code blocks:

Block placed

Block right click

GUI layout

GUI open

GUI on tick

GUI close