Skip to content

Commit b6caac3

Browse files
Reset structure max height to 32 blocks
fixes the thin_birch forest
1 parent ad47423 commit b6caac3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/server/terrain/structuremapgen/SimpleStructureGen.zig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ pub fn generate(map: *StructureMapFragment, worldSeed: u64) void {
9595
const caveMap = CaveMapView.init(main.stackAllocator, map.pos, size, 32);
9696
defer caveMap.deinit(main.stackAllocator);
9797
const margin = 16;
98+
const marginZ = 32;
9899
if(map.pos.voxelSize <= 4) {
99100
const blueNoise = noise.BlueNoise.getRegionData(main.stackAllocator, map.pos.wx -% margin, map.pos.wy -% margin, size + 2*margin, size + 2*margin);
100101
defer main.stackAllocator.free(blueNoise);
@@ -132,7 +133,7 @@ pub fn generate(map: *StructureMapFragment, worldSeed: u64) void {
132133
.generateFn = &SimpleStructure.generate,
133134
},
134135
.priority = model.priority,
135-
}, .{px -% margin, py -% margin, data.wz -% map.pos.wz -% margin}, .{px +% margin, py +% margin, data.wz -% map.pos.wz +% margin});
136+
}, .{px -% margin, py -% margin, data.wz -% map.pos.wz -% marginZ}, .{px +% margin, py +% margin, data.wz -% map.pos.wz +% marginZ});
136137
break;
137138
} else {
138139
randomValue -= model.chance;
@@ -176,7 +177,7 @@ pub fn generate(map: *StructureMapFragment, worldSeed: u64) void {
176177
.generateFn = &SimpleStructure.generate,
177178
},
178179
.priority = model.priority,
179-
}, .{px -% margin, py -% margin, data.wz -% map.pos.wz -% margin}, .{px +% margin, py +% margin, data.wz -% map.pos.wz +% margin});
180+
}, .{px -% margin, py -% margin, data.wz -% map.pos.wz -% marginZ}, .{px +% margin, py +% margin, data.wz -% map.pos.wz +% marginZ});
180181
break;
181182
} else {
182183
randomValue -= adaptedChance;

0 commit comments

Comments
 (0)