Skip to content

Commit 3a7b558

Browse files
Add cave layers (#2826)
This moves (most) height restrictions of biomes to layers instead. Biomes are now assigned to layers using tags. This allows having multiple distinct layers of caves broken up by other biomes (→#2464 #1463). Furthermore this will make cave layers more addon friendly. e.g. an addon could add their own layer between e.g. the caves and the root. The engine would then automatically shift down the layers below by the size of the new layer. Note: The depth hint only decides the order of the layers and is not representative of the actual depth. The actual depth is computed using the layer heights of all layers above it (or below for sky layers). Root and sky layers are currently set to 10000 to allow addons to place other things above/below it. However as long as no such layers exist, the root/sky will continue until the integer limit. To @ikabod-kee and @careeoki I'll put this in requires artistic review for you to look at the new way to specify cave biome height and the new layers.
1 parent ceb88d1 commit 3a7b558

39 files changed

Lines changed: 226 additions & 69 deletions

assets/cubyz/biomes/cave/basalt.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.maxHeight = -1000,
4-
.minHeight = -48250,
55
.chance = 0.2,
66
.fogDensity = 8,
77

assets/cubyz/biomes/cave/cave.zig.zon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.{
22
.isCave = true,
3-
.maxHeight = 0,
4-
.minHeight = -48250,
3+
.tags = .{.cave_layer},
54

65
.fogDensity = 2,
76
.caveNoiseStrength = 10,

assets/cubyz/biomes/cave/crystal.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.maxHeight = -512,
4-
.minHeight = -48250,
55

66
.chance = 0.2,
77
.crystals = 32,

assets/cubyz/biomes/cave/crystal_forest.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.maxHeight = -512,
4-
.minHeight = -48250,
55
.chance = 0.01,
66

77
.crystals = 32,

assets/cubyz/biomes/cave/curl_forest.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.maxHeight = -512,
4-
.minHeight = -48250,
55

66
.fogDensity = 2,
77

assets/cubyz/biomes/cave/dropoff.zig.zon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
.{
22
.isCave = true,
3+
.tags = .{.dropoff_layer},
34
.caveNoiseStrength = 12,
45

5-
.maxHeight = -48125,
6-
.minHeight = -48500,
76
.stoneBlock = "cubyz:slate/base",
87
.fogDensity = 10,
98
.fogColor = 0x272334,

assets/cubyz/biomes/cave/ice_cave.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.caveNoiseStrength = 10,
45
.maxHeight = -256,
5-
.minHeight = -48250,
66
.chance = 0.2,
77
.fogDensity = 20,
88
.fogColor = 0xbabfbf,

assets/cubyz/biomes/cave/lava_cave.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.maxHeight = -1500,
4-
.minHeight = -48250,
55
.fogDensity = 20,
66
.chance = 0.1,
77
.fogColor = 0x51240c,

assets/cubyz/biomes/cave/marble_cave.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.caveNoiseStrength = 5,
4-
.maxHeight = -64,
55
.minHeight = -512,
66
.chance = 0.2,
77

assets/cubyz/biomes/cave/mushroom/_defaults.zig.zon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.{
22
.isCave = true,
3+
.tags = .{.cave_layer},
34
.fogDensity = 2,
45
.music = "cubyz:heart-of-the-beast",
56
.structures = .{

0 commit comments

Comments
 (0)