Link a variable to a position?

Started by KittyGame on

Topic category: Help with modding (Java Edition)

Last seen on 00:08, 20. Jul 2018
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Link a variable to a position?

So, I'm trying to create some teleport blocks and items for my mod. Basically, when you click a certain block with a certain item, they are linked and when the item is right clicked, the player is teleported to the block,

But no matter how much I try, I just can't get the players positions for a variable! Or better, I have the x, y and z little puzzle pieces, but there's nowhere to turn them into a variable value!

What should I do?

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just make 3 global variables…
Fri, 07/20/2018 - 09:58

Just make 3 global variables

Then

Set variable x (x)

set variable y (y)

set variable z (z)

You can find x, y, z on minecraft components and set variable on variables tab

 

PS: global variables are shared between worlds and are reset when closing minecraft, better variables will be added in the future