From b971fc92ec8cd322aa794455dfc46ba561a7b55b Mon Sep 17 00:00:00 2001 From: dags- Date: Wed, 18 Mar 2020 18:35:13 +0000 Subject: [PATCH] further tweaking to sediment placer --- .../main/java/com/terraforged/mod/feature/Matchers.java | 2 -- .../com/terraforged/mod/feature/feature/DiskFeature.java | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/feature/Matchers.java b/TerraForgedMod/src/main/java/com/terraforged/mod/feature/Matchers.java index 7d6e9cd..645e85f 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/feature/Matchers.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/feature/Matchers.java @@ -49,10 +49,8 @@ public class Matchers { BiomeMatcher.of(Biome.Category.RIVER, Biome.Category.SWAMP), FeatureMatcher.builder() .or(Feature.DISK).and("minecraft:sand") - .or(Feature.DISK).and("minecraft:gravel") .or(Feature.DISK).and("minecraft:dirt") .or(DiskFeature.INSTANCE).and("minecraft:sand") - .or(DiskFeature.INSTANCE).and("minecraft:gravel") .or(DiskFeature.INSTANCE).and("minecraft:dirt") .build() ); diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/feature/feature/DiskFeature.java b/TerraForgedMod/src/main/java/com/terraforged/mod/feature/feature/DiskFeature.java index f1f3d0f..e069bda 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/feature/feature/DiskFeature.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/feature/feature/DiskFeature.java @@ -30,11 +30,12 @@ public class DiskFeature extends Feature { return false; } else { int i = 0; - float radius2 = (config.radius * config.radius) * 0.65F; + int radius = 4 + rand.nextInt(config.radius - 2); + float radius2 = (radius * radius) * 0.65F; BlockPos.Mutable blockPos = new BlockPos.Mutable(); - for(int x = pos.getX() - config.radius; x <= pos.getX() + config.radius; ++x) { - for(int z = pos.getZ() - config.radius; z <= pos.getZ() + config.radius; ++z) { + for(int x = pos.getX() - radius; x <= pos.getX() + radius; ++x) { + for(int z = pos.getZ() - radius; z <= pos.getZ() + radius; ++z) { int dx = x - pos.getX(); int dz = z - pos.getZ(); float rad2 = domain.getValue(x, z) * radius2;