Topic category: Help with MCreator software
Hi!
I made a custom portal block that teleports me to a custom dimension. As I seen and know the block does not spawn after entering the dimension and there's no way back. So I decided to make a structure with portal spawn when I enter it. But there's a problem... If I enter this dimension more times the structure will spawn again. I was trhinking about making it spawn depending on advancements (if I made this advancement before the structure won't spawn anymore). But now it's multiplayer problem - players that haven't completed specific advancement will still cause structure to spawn. Please help me, how can I make a structure spawn only when dimension is discovered/entered for the first time. I hope I will get help from you.
Fredzik
Did you use the pre-made block or a custom one? This doesn’t happen if you use the pre-made one.
A custom block. It's a teleporter to the dimension.
Just use the pre-made one.
What do you mean exactly? Sorry I don't understand.
When you create a dimension it pre-creates a portal for you. It is on the second page.
I haven't made a regular portal. I made a block that will teleport the player to the dimension on right click
Oh. Then maybe have an item that teleports you back to the overworld on right click and it is given to you when you enter the dimension.
I was thinking about it. Great idea but I want an actual portal :/ Maybe Klemen will help us.
Make a global variable, that is set to false until you activate the portal. When you tp into the dimention, generate your structure AND THEN CHANGE IT. make sure it's not the other way round or it will not generate. This way, the structure will only generate when it is set to false. When it is created it will no longer be able to because the variable is true.
I haven't tried this myself but in theory it should work
Thanks! I will try it.
I made a logic variable, default "false". And then I've done what you said. In procedure "when player enters dimension" I added "place at x y z structure:<my structure>" and "set global variable:<my variable> to: true". But the structure spawned again...
Try an 'if' block.
If the variable is true, do nothing. If the variable is false, first spawn the structure and then set the variable to false.
Ok, I'll try it too.
Thx that worked :) Structure is not spawning more times. But now it's a common problem of custom portals - spawning underground. I also need help with right spawn place. I tried moving player to y+75 or something, but ground is not flat and i sometimes spawn in air...