Fixed the Strata generator from creating an unpleasant world of shitstone.

This commit is contained in:
Abel Hoogeveen 2020-07-03 20:23:14 +02:00
parent 1013f92e46
commit 2f8b4bcf20
5 changed files with 17 additions and 1 deletions

View File

@ -40,6 +40,7 @@ public class WGTags {
public static final Tag<Block> CLAY = tag("wg_clay");
public static final Tag<Block> SEDIMENT = tag("wg_sediment");
public static final Tag<Block> ERODIBLE = tag("wg_erodible");
public static final Tag<Block> COLD = tag("wg_cold");
public static void init() {

View File

@ -32,7 +32,8 @@ public class StrataConfig {
public Config soil = new Config(0, 1, 0.1F, 0.25F);
public Config sediment = new Config(0, 2, 0.05F, 0.15F);
public Config clay = new Config(0, 2, 0.05F, 0.1F);
public Config rock = new Config(10, 30, 0.1F, 1.5F);
public Config rock = new Config(2, 4, 0.05F, 0.1F);
public Config cold = new Config(10, 30, 0.1F, 1.5F);
public static class Config {

View File

@ -57,11 +57,16 @@ public class Materials {
public final Set<Block> clay = create(WGTags.CLAY, States.CLAY.getBlock());
public final Set<Block> sediment = create(WGTags.SEDIMENT, States.GRAVEL.getBlock());
public final Set<Block> erodible = create(WGTags.ERODIBLE, null);
public final Set<Block> cold = create(WGTags.COLD, States.STONE.getBlock());
public LayerManager getLayerManager() {
return layerManager;
}
public boolean isCold(Block block) {
return cold.contains(block);
}
public boolean isStone(Block block) {
return stone.contains(block);
}

View File

@ -44,6 +44,7 @@ public class GeoGenerator implements StrataGenerator {
private final List<Block> soil;
private final List<Block> clay;
private final List<Block> sediment;
private final List<Block> cold;
private final List<Source> types = new ArrayList<>();
public GeoGenerator(Materials materials) {
@ -52,6 +53,7 @@ public class GeoGenerator implements StrataGenerator {
soil = Materials.toList(materials.dirt);
clay = Materials.toList(materials.clay);
sediment = Materials.toList(materials.sediment);
cold = Materials.toList(materials.cold);
}
@Override
@ -62,6 +64,7 @@ public class GeoGenerator implements StrataGenerator {
addLayer(seed + 2, random, config.sediment, sediment, builder);
addLayer(seed + 3, random, config.clay, clay, builder);
addLayer(seed + 4, random, config.rock, rock, builder);
addLayer(seed + 5, random, config.cold, cold, builder);
return builder.build();
}

View File

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:stone"
]
}