Repository navigation
Generating Single Story Rooms
To Generate rooms you will need to create a room registry. (I Am using RoomRegistry name as an Example)
This part is mainly for generating rooms that only has a Single Story.
First create the Room Registry.
Inside the Room Registry you will need to add these things :
import net.erzekawek.veyl.levelgen.chunkgen.rooms.RoomGroup;
public final class RoomRegistry {
private RoomRegistry() {
}
public static void registerRooms() {
RoomGroup.builder(Identifier.fromNamespaceAndPath(MOD_ID, groupName))
.guides(blockSingle, blockMulti)
// single cell rooms
.single(roomPath, yOffset, weight)
// multi cell rooms
.multi(roomPath, cellsX, cellsZ, yOffset, weight)
// starting
.start(roomPath, cellsX, cellsZ, yOffset)
.register();
}
}
- blockSingle : Guide Block for single celled rooms.
- blockMulti : Guide Block for multi celled rooms.
- groupName : The RoomGroup name, has to be a string e.g.
"rooms". - roomPath : The Room's Path. Usually
Identifier.fromNamespaceAndPath(MOD_ID, roomPath) - yOffset : How much you want to offset the rooms on the Y Axis.
- weight : How much the rooms generate.
$\frac{w}{\sum_w}$ . - cellsX : How many cells the room take up on the X Axis.
- cellsZ : How many cells the room take up on the Z Axis.
All Rooms must follow these Strict Guidelines.
1x1 pieces. They must be exactly cell_size wide and deep (for example, 8x?x8 with cell_size 8).
- Put one guide block on the top rim at each opening, on the outer edge row.
- Build one orientation of each shape (nub, straight, corner, 3-way, 4-way). The generator rotates them.
For a more comprehensive guide. See the image below :

Multi-cell rooms and the start room. The size must be cells x cell_size. A 2x1 hallway is 16x?x8.
Use the level's multi guide block at each opening.
For a more comprehensive guide. See the Image Below :

To actually generate the Rooms in a dimension you need to make a dimension JSON using the veyl:maze generator type.
Example :
{
"type": "<your dimension_type>",
"generator": {
"type": "veyl:maze",
"biome_source": {
"type": "minecraft:fixed",
"biome": "<biome used>"
},
"group": "<your_modid>:<your_groupname>",
"cell_size": <your cell size>,
"region_size": 16,
"base_y": <y value>,
"seed": <random int>,
"multi_room_chance": <range from 0 to 1 (0.08 best)>,
"gate_chance": <0 to 1 (use 0.4 for best)>
}
}