Started by
SpiritUnion
on
Topic category: Help with Minecraft modding (Java Edition)
I have a block that stores it's position in 3 global map variables (x, y, z) and a item that will teleport the player on top of that block. These variables are set as soon as the player places the block. Everything works perfectly until the player leaves the world. For some reason, it resets all the variables back to the initial values. According the the wiki page on variables, global map variables should save with the world so I don't know why they reset. Is this a bug or can someone explain this to me?
Edited by SpiritUnion on Sun, 01/12/2020 - 22:58
Which MCreator version and which trigger do you use to set variables?
MCreator Version 2019.5
I'm using the trigger "When block is placed by" in the block's triggers. The procedure the trigger calls is an if statement testing if the block has not been placed (the initial value of the variables, "123456789," have not been replaced) it will set the global map variables x, y, and z, to the block's x, y, and z coordinates. Just to be clear, the actual variable names are not "x," "y," and "z," just in case that might cause a different issue.
Please open a support ticket, attach your workspace and tell me how to reproduce / test this bug in the game. Thanks!
I posted an issue forum at https://mcreator.net/tracker/issue/56234.