Skip to content

Commit

Permalink
Mud gen
Browse files Browse the repository at this point in the history
  • Loading branch information
maityyy committed Nov 7, 2024
1 parent 68df3bf commit 5ca9e0c
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
]
}
}
]
}
},
{
Expand Down

0 comments on commit 5ca9e0c

Please sign in to comment.