Help with Prcedural Structure Generation

Started by Nintwendo on

Topic category: Help with MCreator software

Last seen on 17:15, 10. Jan 2024
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with Prcedural Structure Generation

So I have a structure I want to load that has multiple parts. I want to load these parts randomly. Each of these structures is part of a camp, and each camp has a certain structure at it's center. center. I could just call a procedure that generates certain structures at certain distances from the center structure, but then certain structures might generate floating or in the ground, if the terrain jumps up or down next to the center structure. I also want to be able to use certain features like random rotation. So here is what I did:

First, I called a procedure whenever the center structure generates. This procedure has eight "if" statements. Each of these statements checks if a random decimal between 0 and 1 is less than 0.5. if it is, is each "if" statement calls another procedure, specifically in one of eight positions 10-20 blocks away from the center structure.

They all call the same procedure, but from different locations. This second procedure generates a random decimal between 0 and 7, rounds it to the nearest whole, and then depending on the result, calls one of seven different procedures. Since this procedure was called from different locations around the center, I would assume that these seven procedures would be called from the same location.

These seven procedures are all the same, they immediately return true. The reason for this is because I have set each of these seven procedures to be the generation condition for seven different structures that I want to generate around the center structure. I have made these structures never generate by themselves, only when their condition procedure is called.

However, none of these structures are generating. I have flown around the world and found 4-5 of the central structures, but never any of the surrounding structures.

On a side note, the procedure that is called whenever the center structure generates is also supposed to spawn some custom mobs nearby, but they never appear. This procedure IS called every time the structure generates, or at least that is what I have set it to.

Can anyone tell me what I am doing wrong here?