From 378796cdda7fdb321a8df7ae902ca9715ad52ec6 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sat, 5 Oct 2019 15:34:41 +0100 Subject: [PATCH] Make fast worldgen check the central position for water rather than checking the biome --- .../wizardry/worldgen/WorldGenSurfaceStructure.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/electroblob/wizardry/worldgen/WorldGenSurfaceStructure.java b/src/main/java/electroblob/wizardry/worldgen/WorldGenSurfaceStructure.java index 464c023c..bd0407f8 100644 --- a/src/main/java/electroblob/wizardry/worldgen/WorldGenSurfaceStructure.java +++ b/src/main/java/electroblob/wizardry/worldgen/WorldGenSurfaceStructure.java @@ -145,8 +145,8 @@ public abstract class WorldGenSurfaceStructure implements IWorldGenerator { if(Wizardry.settings.fastWorldgen){ BlockPos result = origin.up(startingHeight); - // Fast worldgen doesn't check for water, instead it checks the biome like vanilla, which is crude but fast - return BiomeDictionary.hasType(world.getBiome(result), BiomeDictionary.Type.WATER) ? null : result; + // Fast worldgen only checks the central position for water, which isn't perfect but it is faster + return world.getBlockState(new BlockPos(centre.getX(), startingHeight + 1, centre.getZ())).getMaterial().isLiquid() ? null : result; } int[] floorHeights = new int[size.getX() * size.getZ()];