Started by
aaronisda
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I've made a procedure that is supposed to set the player's spawn to where they died and then set them to spectator. But, when they turn into spectator, they don't spawn where they died, they spawn at the world spawn, or if right clicked a bed, they spawned at their bed. I've tried adding a 1 tick delay between setting the spawn and setting to spectator mode, but nothing works. I also made another procedure that sets the gamerule doImmediateRespawn to true whenever a world tick happens. I've sent the code as an image also.
Edited by aaronisda on Fri, 06/30/2023 - 22:18
I think you can replace the "Set spawn" block with a "Cancel event that triggered global trigger" block (under Advanced). This way, the player doesn't die at all. You might need to set the player's health as full as well.
Thank you, I would've never thought of that since I'm since familiarizing myself with MCreator's coding blocks.