How to make a structure spawn only once?

Started by RealOrangeSheep on Fri, 02/05/2021 - 22:20

Topic category: Help with modding (Java Edition)

Last seen on 05:37, 20. Apr 2021
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a structure spawn only once?
Fri, 02/05/2021 - 22:20

I have seen a few mods that are able to make a certain structure spawn only once for each new world you make, typically at a specific set of co-ordinates. I want to know if there is a way I can do this myself and if I can also make another variant where it spawns only once but without being at a specific set of co-ordinates.

Last seen on 23:35, 15. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I don't believe this is…
Fri, 02/05/2021 - 23:03

I don't believe this is possible. just make it really rare (like 1 structure per 1,000,000 chunks

Interesting idea, also…
Fri, 02/05/2021 - 23:15

Interesting idea, also thought about it, though decided it's unpractical in my situation.

But for playability case, I suggest making anything that can lead you to such structure. With generating only one per world, sometimes it can be impossible to find one.

Last seen on 05:37, 20. Apr 2021
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry it took me so long to…
Mon, 02/08/2021 - 02:16

Sorry it took me so long to reply but my plan is really just to make it to at least spawn at the same set of co-ordinates each time.

Last seen on 15:26, 12. Mar 2022
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Create a structure, for…
Mon, 02/08/2021 - 10:51

Create a structure, for example using structures blocks in a test world then add the structure in the mod.

Then add a variable in the variable tab in the workspace with the name you want, with variable type set to string and variable scope set to global_world.

Then add a procedure and change it's event trigger to something like "player joins the world"

add " IF [get global [Your variable] ] = false then

place at 0 0 0 (you can change the coordinates) with rotation [You choose] mirror [You choose] structure [Your structure]

set global [Your variable] to true

 

This way everytime a player joins the game will attempt to spawn the structure at the coordinates, but it will only do so if the structure doesn't already exist (if your variable is on false)

 

 

Last seen on 13:29, 13. Feb 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
wait--global_world will be…
Mon, 02/08/2021 - 12:22

wait--global_world will be reset every time the player goes to another dimension.use global_map instead.

Last seen on 18:55, 25. Feb 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
What version are you using?…
Mon, 02/22/2021 - 19:26

What version are you using? If it is the mcreator snapshot I have the solution

Last seen on 05:37, 20. Apr 2021
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I use mcreator 20205. I'm…
Sat, 03/13/2021 - 18:27

I use mcreator 20205. I'm not sure I want to use the snapshots yet.

Last seen on 05:06, 27. Mar 2022
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I'm also wondering and I'm…
Sun, 04/04/2021 - 23:16

I'm also wondering and I'm using the snapshot. Can you tell me, please?

 

Last seen on 20:17, 15. May 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
When I try to do the…
Sat, 05/29/2021 - 19:16

When I try to do the procedure you said there is no way to put in the false anywhere.

Last seen on 21:43, 19. May 2022
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
when World is made spawn at …
Sat, 05/29/2021 - 20:35

when World is made spawn at  x y z structure