From 5ca9e0c571af581ce40dd9f78fdf0a3b20b6992c Mon Sep 17 00:00:00 2001 From: miyamashak Date: Thu, 7 Nov 2024 18:45:56 +0300 Subject: [PATCH] Mud gen --- .../terrain/AylythSurfaceMaterialRules.java | 19 +- .../noise_settings/aylyth_settings.json | 237 ++++++++++-------- 2 files changed, 142 insertions(+), 114 deletions(-) diff --git a/src/datagen/java/moriyashiine/aylyth/datagen/common/world/terrain/AylythSurfaceMaterialRules.java b/src/datagen/java/moriyashiine/aylyth/datagen/common/world/terrain/AylythSurfaceMaterialRules.java index e452ff68..8af5d3d7 100644 --- a/src/datagen/java/moriyashiine/aylyth/datagen/common/world/terrain/AylythSurfaceMaterialRules.java +++ b/src/datagen/java/moriyashiine/aylyth/datagen/common/world/terrain/AylythSurfaceMaterialRules.java @@ -25,15 +25,20 @@ private AylythSurfaceMaterialRules() {} public static MaterialRule build() { var bedrock = condition(verticalGradient("aylyth:bedrock_layer", YOffset.BOTTOM, YOffset.aboveBottom(5)), block(Blocks.BEDROCK)); - var grassIfNotWater = condition(ABOVE_WATER_LEVEL, block(Blocks.GRASS_BLOCK)); - var onSurface = condition( + var mudUnderwater = condition(not(ABOVE_WATER_LEVEL), block(Blocks.MUD)); + var grassAboveWater = condition(ABOVE_WATER_LEVEL, block(Blocks.GRASS_BLOCK)); + + var floor = condition( ON_FLOOR, - condition( - AT_OR_ABOVE_WATER_LEVEL, - sequence(deepwood(), copseAndOverwrownClearing(), copse(), grassIfNotWater, block(Blocks.DIRT)) + sequence( + mudUnderwater, + condition( + AT_OR_ABOVE_WATER_LEVEL, + sequence(deepwood(), copseAndOverwrownClearing(), copse(), grassAboveWater, block(Blocks.DIRT)) + ) ) ); - var dirtUnderFloor = condition( + var underFloor = condition( BELOW_SHALLOW_WATER, condition( UNDER_FLOOR, @@ -45,7 +50,7 @@ public static MaterialRule build() { ) ) ); - var abovePreliminarySurface = condition(surface(), sequence(uplands(), mire(), onSurface, dirtUnderFloor)); + var abovePreliminarySurface = condition(surface(), sequence(uplands(), mire(), floor, underFloor)); return sequence(bedrock, bowels(), abovePreliminarySurface); } diff --git a/src/main/generated/data/aylyth/worldgen/noise_settings/aylyth_settings.json b/src/main/generated/data/aylyth/worldgen/noise_settings/aylyth_settings.json index 9aec2442..068bf1d2 100644 --- a/src/main/generated/data/aylyth/worldgen/noise_settings/aylyth_settings.json +++ b/src/main/generated/data/aylyth/worldgen/noise_settings/aylyth_settings.json @@ -369,143 +369,166 @@ "surface_type": "floor" }, "then_run": { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:water", - "add_stone_depth": false, - "offset": -1, - "surface_depth_multiplier": 0 - }, - "then_run": { - "type": "minecraft:sequence", - "sequence": [ - { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:biome", - "biome_is": [ - "aylyth:deepwood", - "aylyth:coniferous_deepwood" - ] - }, - "then_run": { - "type": "minecraft:sequence", - "sequence": [ - { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": 0, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:mud" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": -1, + "surface_depth_multiplier": 0 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "aylyth:deepwood", + "aylyth:coniferous_deepwood" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "max_threshold": 1.7976931348623157E308, + "min_threshold": 0.3, + "noise": "aylyth:deepwood_dark_podzol_patches" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:mud" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "max_threshold": 0.05, + "min_threshold": -0.05, + "noise": "aylyth:deepwood_podzol_veins" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:podzol", + "Properties": { + "snowy": "false" + } + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "aylyth:copse", + "aylyth:overgrown_clearing" + ] + }, + "then_run": { "type": "minecraft:condition", "if_true": { "type": "minecraft:noise_threshold", "max_threshold": 1.7976931348623157E308, - "min_threshold": 0.3, - "noise": "aylyth:deepwood_dark_podzol_patches" + "min_threshold": 0.95, + "noise": "aylyth:podzol_patches" }, "then_run": { "type": "minecraft:block", "result_state": { - "Name": "minecraft:mud" + "Name": "minecraft:podzol", + "Properties": { + "snowy": "false" + } } } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "aylyth:copse", + "aylyth:coniferous_copse" + ] }, - { + "then_run": { "type": "minecraft:condition", "if_true": { "type": "minecraft:noise_threshold", - "max_threshold": 0.05, - "min_threshold": -0.05, - "noise": "aylyth:deepwood_podzol_veins" + "max_threshold": 0.03, + "min_threshold": -0.03, + "noise": "aylyth:copse_dark_podzol_veins" }, "then_run": { "type": "minecraft:block", "result_state": { - "Name": "minecraft:podzol", - "Properties": { - "snowy": "false" - } + "Name": "minecraft:mud" } } } - ] - } - }, - { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:biome", - "biome_is": [ - "aylyth:copse", - "aylyth:overgrown_clearing" - ] - }, - "then_run": { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:noise_threshold", - "max_threshold": 1.7976931348623157E308, - "min_threshold": 0.95, - "noise": "aylyth:podzol_patches" }, - "then_run": { - "type": "minecraft:block", - "result_state": { - "Name": "minecraft:podzol", - "Properties": { - "snowy": "false" + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": 0, + "surface_depth_multiplier": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:grass_block", + "Properties": { + "snowy": "false" + } } } - } - } - }, - { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:biome", - "biome_is": [ - "aylyth:copse", - "aylyth:coniferous_copse" - ] - }, - "then_run": { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:noise_threshold", - "max_threshold": 0.03, - "min_threshold": -0.03, - "noise": "aylyth:copse_dark_podzol_veins" }, - "then_run": { + { "type": "minecraft:block", "result_state": { - "Name": "minecraft:mud" + "Name": "minecraft:dirt" } } - } - }, - { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:water", - "add_stone_depth": false, - "offset": 0, - "surface_depth_multiplier": 0 - }, - "then_run": { - "type": "minecraft:block", - "result_state": { - "Name": "minecraft:grass_block", - "Properties": { - "snowy": "false" - } - } - } - }, - { - "type": "minecraft:block", - "result_state": { - "Name": "minecraft:dirt" - } + ] } - ] - } + } + ] } }, {