How can i make a variable that is linked to a block?

Started by SpideyByte on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i make a variable that is linked to a block?

So I have this teleporter block that links to other teleporters through this tablet the way it works is it when sneaking and right clicking a teleporter with it in your hand it links the tablet to that location and when right clicking another teleporter it just says that it's a teleporter as a placeholder because I don't know how to get the location from the variable and put it into a separate variable for the block only