From 5da6c65df610ef276ee1d189d4c40b874d0112b1 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 27 May 2024 19:33:52 +0100 Subject: [PATCH] fix: use correct coordinates in BufferedPattern2D and NoiseFilter --- .../core/function/pattern/BufferedPattern2D.java | 2 +- .../java/com/sk89q/worldedit/function/mask/NoiseFilter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/function/pattern/BufferedPattern2D.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/function/pattern/BufferedPattern2D.java index 483629af4..7748c8633 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/function/pattern/BufferedPattern2D.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/function/pattern/BufferedPattern2D.java @@ -33,7 +33,7 @@ public class BufferedPattern2D extends BufferedPattern { @Override public boolean set(BlockVector3 pos) { - return set.add(pos.x(), 0, pos.y()); + return set.add(pos.x(), 0, pos.z()); } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java index d0a016639..8dd9c26d9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/NoiseFilter.java @@ -97,7 +97,7 @@ public class NoiseFilter extends AbstractMask { @Override public boolean test(BlockVector3 vector) { //FAWE start - mutable - return noiseGenerator.noise(mutable.setComponents(vector.x(), vector.z(), vector.z())) <= density; + return noiseGenerator.noise(mutable.setComponents(vector.x(), vector.y(), vector.z())) <= density; //FAWE end }