diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-04-05 20:41:13 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-04-05 20:41:13 +0300 |
| commit | 5b9935f737c226847e668bde0185adbc6a5a8b7b (patch) | |
| tree | 980cdbadd8635bcd48aa67966c7cceef4677ca64 /ihl/worldgen/WorldGeneratorSurfaceLake.java | |
| parent | cd9b5adda974ad9a5e5732fe645571907313b38d (diff) | |
some experiments
Diffstat (limited to 'ihl/worldgen/WorldGeneratorSurfaceLake.java')
| -rw-r--r-- | ihl/worldgen/WorldGeneratorSurfaceLake.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ihl/worldgen/WorldGeneratorSurfaceLake.java b/ihl/worldgen/WorldGeneratorSurfaceLake.java index 3affdaf..11abf5e 100644 --- a/ihl/worldgen/WorldGeneratorSurfaceLake.java +++ b/ihl/worldgen/WorldGeneratorSurfaceLake.java @@ -1,12 +1,10 @@ package ihl.worldgen; import ihl.utils.IHLMathUtils; -import ihl.utils.IHLUtils; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.storage.ExtendedBlockStorage; public class WorldGeneratorSurfaceLake extends WorldGeneratorBase { @@ -25,9 +23,12 @@ public class WorldGeneratorSurfaceLake extends WorldGeneratorBase { int y2 = y += IHLMathUtils.sign(surroundPOI[1] - world.getActualHeight() / 4 - y); for (int iz = z; iz < 16 && iz >= 0; iz += IHLMathUtils.sign(surroundPOI[2] - z)) { y2 += IHLMathUtils.sign(surroundPOI[1] - world.getActualHeight() / 4 - y2); - if (y2 > world.getActualHeight() * 3 / 8 - && world.getBlock(ix + startX, 64, iz + startZ) == Blocks.air) { - this.replace(world, ix + startX, 63, iz + startZ, ore); + int dx = ix-x; + int dz = iz-z; + int d = dx*dx+dz*dz; + if (d < 64 && y2 > world.getActualHeight() * 3 / 8 + && world.getBlock(ix + startX, 63, iz + startZ) == Blocks.air) { + this.replace(world, ix + startX, 62, iz + startZ, ore); } if (surroundPOI[2] == z) { break; |
