Started by
Faceless Pikachu
on
Topic category: Help with MCreator software
I need to be able to set it that a variable is set to be the direction of a block.
How would I do this? When I tried to do it I tried combining [set variable [x]] and [get block direction x y z] but it didn't work.
Hello!
I made to 3 elements for testing.
An item, which checks the direction on right click. ( it's not necessary)
A global string variable.
A procedure, which does the Variable setting and the outprint(which is also not necessary).
I will try to insert a picture here with the procedure, if the picture is not working, then I will write a link which points at the picture.
Thank you!
Depending for what you actually need it, however I reccomend you to get blocks current direction and define it in NBT tag binded to this block as a number, example 0 = north or 6 = down than just call it with whatever you want
I also don't recommend using variables other than NBT tags with blocks, items or Entities because they are not very stable to use
but note that if you want to use NBT tags on a block than you will need to set it as TileEntity block