Started by
SwordShattered
on
Topic category: Help with Minecraft modding (Java Edition)
For my mod dimension, I want to have one extremely long road that generates in a straight line with structures that spawn beside it. How can I do this?
...Depends on how complicated you want to make it?
You'll need some custom modded blocks to constantly generate a road in both directions. Place one of them at the player's position when they enter the dimension, and have it generate a road structure with more of the custom blocks on either end. (Thus continuously generating the road in both directions whenever new chunks are loaded.) If you want it to eventually stop, you can use the distance from origin as an indicator of how long the road has gotten.
Depending on how you want the road itself to generate, (which could get quite complex depending on your dimension's terrain), you could wind up needing more custom blocks.
For my roads, I essentially use something to target each block in a rectangular shape at world surface, and replace them with my desired block. (In my case, randomly selected blocks to make the road textured.) This is also configured to make the road thin out the further it goes. (As the offset gets higher.) Again, depends on your use case.