How can I create an structure that only generates once?

Started by InkyCipher on

Topic category: Help with modding (Java Edition)

Last seen on 22:46, 12. Jun 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I create an structure that only generates once?

So, I'd like to know if I could create an structure that is only generated once per world.

Last seen on 20:38, 30. Dec 2022
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try this: Create a custom…
Fri, 06/26/2020 - 01:35

Try this:

Create a custom variable, call it something like "firstLoad", boolean starts as true

Then create a precedure with the global trigger "Minecraft loads a world". This triggers whenever you open your world save. Test for the boolean "firstLoad" being true: if so, spawn your structure in some coordinate, then set "firstLoad" to false. Now, when you load this world, "firstLoad" will always be false, not triggering the structure spawn.

 

Not really tried it myself but see if you like the results

Last seen on 23:16, 12. Nov 2023
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you please send a…
Sat, 05/29/2021 - 19:42

Can you please send a screenshot of the procedure so I can see it please? It would be really helpful.

Last seen on 14:05, 16. Oct 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you managed to do it…
Thu, 06/24/2021 - 23:14

If you managed to do it could you send me the tutorial by video ??

Discord: ..Eric..#0184

Email: nogueiraeric23@gmail.com
 
Please help me

Last seen on 17:15, 28. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
He explained it kinda weird…
Sun, 06/27/2021 - 21:21

He explained it kinda weird. Basically just go to the variables section and make a new variable called FirstTimeJoining, and make it initially false. Make a procedure and go to the Triggers and do, "When Minecraft Loads a World" like he said, and then do an "If - Do" Procedure block. 

Go to logic, get the light blue equals block, put that in the If, then go to custom procedures or whatever and get the light blue variable block, and click the FirstTimeJoining variable. Put that in the first slot of the equals block, and in the second, go to Logic again and get the True block and put that in the second equals slot and turn it to false. 

Then, for Do, go to the custom procedures again and get "Set FirstTimeJoining to:" then out that under Do, and put another True in there. Keep it as true.

Then, you get the summon structure procedure block and summon the structure you want. 

Last seen on 15:05, 6. Oct 2023
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Guys, you make it too…
Sun, 06/27/2021 - 21:49

Guys, you make it too complicated. It's integrated in the structure. I will write it here soon.

Last seen on 15:05, 6. Oct 2023
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1. Create a global Variable …
Sun, 06/27/2021 - 22:04

1. Create a global Variable (Logic, Default false)

2. Go on your structure spawn, and create the Procedure at the bottom "On Structure Generated" and insert the Variable Block: "Set global: [YOUR VARIABLE] to [true]" or something like this.

3. Go back, and create a Procedure by clicking on + at "Additional Generation Condition", add a "Return" block, and hook a [ () = ()] Block on it. In that field, compare the variable you created to "false", meaning, if its false, it gets generated, if true, it won't.

4. On some versions, you have to press on "recover code" to make it work.

 

https://imgur.com/a/aHOai52