Dungeon-Like Structure Generator is Chaos!

Started by Some Redstone Guy on

Topic category: Help with modding (Java Edition)

Last seen on 11:22, 16. Apr 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dungeon-Like Structure Generator is Chaos!

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)

https://imgur.com/1EJVaFp

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)

https://imgur.com/525sI4I

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

Last seen on 16:26, 16. Apr 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It seems like your blocks…
Tue, 04/12/2022 - 18:03

It seems like your blocks aren't actually spawning as far away as they're supposed to, and when the corrupter checks if there is one already then it isn't in the correct spot, and makes another. Since you used an even number then it won't copy the same distance in every direction, you could try changing the size of the room and see if that evens it out. For testing you could change how often they activate from 10 to something like 60, so you can see each step in the process and when it repeats itself.

Last seen on 11:22, 16. Apr 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried running it slow, it…
Tue, 04/12/2022 - 19:12

I tried running it slow, it generates fine at first, but then a few gaps appear, and as it spreads even more gaps appear before everything is overlapping chaotically. But this should not really affect the corrupter blocks as the generation for the rooms does not cover where they are placed until they become generator blocks

Last seen on 23:12, 13. Aug 2023
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well... you could make it…
Thu, 04/14/2022 - 00:29

well... you could make it into a feature. the backgrooms has random gaps

Image

Last seen on 01:57, 15. Feb 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im a year late but its…
Sun, 12/24/2023 - 10:18

im a year late but its because you have some of the structures spawn in rotated and so when they spawn in they are facing a different direction pair this up with multiple rotated and they completely ignore spots if you set all the structures to have no rotation youll see what im talkin about- even though since im a year late you probbably fixed it already