Started by
InkyCipher
on
Topic category: Help with Minecraft modding (Java Edition)
So, I'd like to know if I could create an structure that is only generated once per world.
Topic category: Help with Minecraft modding (Java Edition)
So, I'd like to know if I could create an structure that is only generated once per world.
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
Can you please send a screenshot of the procedure so I can see it please? It would be really helpful.
If you managed to do it could you send me the tutorial by video ??
Discord: ..Eric..#0184
Email: nogueiraeric23@gmail.com
Please help me
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.
Guys, you make it too complicated. It's integrated in the structure. I will write it here soon.
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