Finding x y z of a block

Started by shadowmaster2119 on

Topic category: Help with modding (Java Edition)

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Finding x y z of a block

I am hoping to create an item that teleports the player to a certain block (like the magic mirror in terraria) I want to know how I can get the x y z coordinates of the block when it's placed. From there I can put it into a global variable and get the item to move the entity to those coordinates. Does anyone know how I can get the x y z coordinates of a block?

Thanks,

Shadow

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Whenever you place a block,…
Wed, 10/23/2019 - 12:04

Whenever you place a block, simply set a variable to x/y/z in minecraft components through the procedure that triggers when the player places the block.

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know how to get the…
Wed, 10/23/2019 - 21:39

I don't know how to get the x y z of the block

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can safe the xyz in NBT…
Thu, 10/24/2019 - 15:36

You can safe the xyz in NBT tags or global variables. The x y z of a block is the x y z that you find in minecraft components procedure tab.

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right Thanks! bye the time I…
Tue, 10/29/2019 - 08:37

Right Thanks! bye the time I replied to this I already found the solution and had started other things xD Thanks though. I read this and it made me keep looking!

Thanks,

Shadow

Last seen on 09:38, 18. Jul 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can anyone help me with…
Wed, 01/25/2023 - 15:10

Can anyone help me with storing the X Y Z of the block?