Started by
shadowmaster2119
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
I don't know how to get the x y z of the block
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.
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
Can anyone help me with storing the X Y Z of the block?