From 83464013ba36cfdde3cc52e4efa34aba94b07a49 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 14 Sep 2018 07:38:29 +1000 Subject: [PATCH] Fix oregen --- .../java/com/boydti/fawe/jnbt/anvil/generator/OreGen.java | 6 +++--- .../src/main/java/com/sk89q/worldedit/extent/Extent.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/generator/OreGen.java b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/generator/OreGen.java index 70a1415db..c9af936e1 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/generator/OreGen.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/generator/OreGen.java @@ -48,8 +48,8 @@ public class OreGen extends Resource { } double f = rand.nextDouble() * Math.PI; - int x8 = x + 8; - int z8 = z + 8; + int x8 = x; + int z8 = z; double so8 = maxSizeO8; double so16 = maxSizeO16; double sf = MathMan.sinInexact(f) * so8; @@ -107,7 +107,7 @@ public class OreGen extends Resource { double dxyz2 = dxy2 + dz * dz; if ((dxyz2 < 1)) { if (mask.test(mutable)) - extent.setBlock(xx, yy, zz, pattern.apply(mutable)); + pattern.apply(extent, mutable, mutable); } } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java index a52279768..811772868 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/Extent.java @@ -266,8 +266,8 @@ public interface Extent extends InputExtent, OutputExtent { if (random.nextInt(100) > rarity) { continue; } - int x = (chunkPos.getBlockX() << 4) + PseudoRandom.random.nextInt(16); - int z = (chunkPos.getBlockZ() << 4) + PseudoRandom.random.nextInt(16); + int x = (chunkPos.getBlockX() << 4) + random.nextInt(16); + int z = (chunkPos.getBlockZ() << 4) + random.nextInt(16); gen.spawn(random, x, z); } }