Skip to content

Commit

Permalink
Biomes that weren't found should have a chance of zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegratedQuantum committed Jun 11, 2024
1 parent 68edf31 commit 1296828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/terrain/biomes.zig
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pub const Biome = struct {
.supportsRivers = json.get(bool, "rivers", false),
.preferredMusic = main.globalAllocator.dupe(u8, json.get([]const u8, "music", "")),
.isValidPlayerSpawn = json.get(bool, "validPlayerSpawn", false),
.chance = json.get(f32, "chance", 1),
.chance = json.get(f32, "chance", if(json == .JsonNull) 0 else 1),
.maxSubBiomeCount = json.get(f32, "maxSubBiomeCount", std.math.floatMax(f32)),
};
if(self.minHeight > self.maxHeight) {
Expand Down

0 comments on commit 1296828

Please sign in to comment.