Topic category: Help with modding (Java Edition)
So I am trying to make a backrooms mod, and I have two structures to generate the maze-like randomness. I have a 6x6 square of carpet and a ceiling with no walls, and the same thing, but with one wall. The structure with one wall is randomly rotated to make a maze. I am trying to make a chain reaction that keeps generating rooms where a block is placed. I have a Room Generator block that instantly spawns in at random one of the rooms when placed:
(The following code runs when a room generator is added)
So I have a block called Corrupter, that places another corrupter 6 blocks away in each direction (only if there isn't already a corrupter there), and then turns itself into a room generator block.
(the following code runs every block tick on the corrupter, that has a tick rate of 10)
What this is supposed to do, is make a grid like structure of corrupter blocks that all generate a room in their square. What actually happens is that the corrupter blocks still keep generating where there already is a room, and then it starts repeatedly creating random rooms the overlap with each other. The 6 block offset is supposed to be exactly enough for one corrupter to generate one room in a square, but this doesn't happen