diff --git a/TerraForgedCore/src/main/java/com/terraforged/core/filter/Steepness.java b/TerraForgedCore/src/main/java/com/terraforged/core/filter/Steepness.java index be06092..8c7be9f 100644 --- a/TerraForgedCore/src/main/java/com/terraforged/core/filter/Steepness.java +++ b/TerraForgedCore/src/main/java/com/terraforged/core/filter/Steepness.java @@ -56,8 +56,8 @@ public class Steepness implements Filter, Filter.Visitor { @Override public void visit(Filterable cellMap, Cell cell, int cx, int cz) { float totalHeightDif = 0F; - for (int dz = -radius; dz <= radius; dz++) { - for (int dx = -radius; dx <= radius; dx++) { + for (int dz = -1; dz <= 2; dz++) { + for (int dx = -1; dx <= 2; dx++) { if (dx == 0 && dz == 0) { continue; } diff --git a/TerraForgedCore/src/main/java/com/terraforged/core/world/WorldFilters.java b/TerraForgedCore/src/main/java/com/terraforged/core/world/WorldFilters.java index 5f78f94..b9e20c3 100644 --- a/TerraForgedCore/src/main/java/com/terraforged/core/world/WorldFilters.java +++ b/TerraForgedCore/src/main/java/com/terraforged/core/world/WorldFilters.java @@ -45,7 +45,7 @@ public class WorldFilters { this.settings = context.settings.filters; this.erosion = new Erosion(context.settings, context.levels); this.smoothing = new Smoothing(context.settings, context.levels); - this.steepness = new Steepness(2, 10F, context.terrain); + this.steepness = new Steepness(1, 10F, context.terrain); } public void apply(Region region) { diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java index edb2b74..6a403c1 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java @@ -64,11 +64,15 @@ public class BiomeProvider extends AbstractBiomeProvider { this.modifierManager = SetupHooks.setup(new BiomeModifierManager(context, biomeMap), context.copy()); } + public Cell lookupPos(int x, int z) { + return worldLookup.getCell(x, z); + } + @Override public Biome getNoiseBiome(int x, int y, int z) { x = (x << 2); z = (z << 2); - return getBiome(worldLookup.getCell(x, z), x, z); + return getBiome(lookupPos(x, z), x, z); } @Override diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/test/Test.java b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/test/Test.java index 8a0e3c0..57df63f 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/test/Test.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/test/Test.java @@ -27,18 +27,18 @@ package com.terraforged.mod.chunk.test; import com.terraforged.core.world.terrain.Terrain; import com.terraforged.core.world.terrain.Terrains; +import com.terraforged.mod.biome.ModBiomes; import net.minecraft.world.biome.Biome; -import net.minecraft.world.biome.Biomes; public class Test { public static boolean fixedBiome = true; public static Terrain getTerrainType(Terrains terrains) { - return terrains.dales; + return terrains.mountains; } public static Biome getBiome() { - return Biomes.PLAINS; + return ModBiomes.TAIGA_SCRUB; } } diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/command/TerraCommand.java b/TerraForgedMod/src/main/java/com/terraforged/mod/command/TerraCommand.java index cddedc5..ed322b7 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/command/TerraCommand.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/command/TerraCommand.java @@ -108,16 +108,14 @@ public class TerraCommand { } private static int query(CommandContext context) throws CommandSyntaxException { - TerraContext terraContext = getContext(context).orElseThrow(() -> createException( + getContext(context).orElseThrow(() -> createException( "Invalid world type", "This command can only be run in a TerraForged world!" )); BlockPos pos = context.getSource().asPlayer().getPosition(); - WorldGenerator worldGenerator = terraContext.factory.get(); BiomeProvider biomeProvider = getBiomeProvider(context); - Cell cell = new Cell<>(); - worldGenerator.getHeightmap().apply(cell, pos.getX(), pos.getZ()); + Cell cell = biomeProvider.lookupPos(pos.getX(), pos.getZ()); Biome biome = biomeProvider.getBiome(cell, pos.getX(), pos.getZ()); context.getSource().sendFeedback( new StringTextComponent("Terrain=" + cell.tag.getName() + ", Biome=" + biome.getRegistryName()),