Link a variable to a position?

Started by KittyGame on Fri, 07/20/2018 - 00:08

Topic category: Help with modding (Java Edition)

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Link a variable to a position?
Fri, 07/20/2018 - 00:08

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 13:33, 14. Nov 2020
Joined Jun 2016
User points:

User statistics:

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