From a43ccd820e58579f5e10b61f57655cc4f8621597 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 8 Mar 2023 04:59:45 +0100 Subject: [PATCH] More accurate comments --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 5 +++-- .../regions/shape/WorldEditExpressionEnvironment.java | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index cf94578c26..e7bd59bd69 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -2362,12 +2362,13 @@ public int deformRegion(final Region region, final Vector3 zero, final Vector3 u final DoubleArrayList queue = new DoubleArrayList<>(false); for (BlockVector3 position : region) { - // offset, scale + // transform final Vector3 scaled = position.toVector3().subtract(zero).divide(unit); - // transform + // deform expression.evaluate(new double[]{scaled.getX(), scaled.getY(), scaled.getZ()}, timeout); + // untransform, round-nearest final BlockVector3 sourcePosition = environment.toWorld(x.getValue(), y.getValue(), z.getValue()); // read block from world diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java index 56763d3bc2..da1825259d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java @@ -39,7 +39,6 @@ public WorldEditExpressionEnvironment(Extent extent, Vector3 unit, Vector3 zero) } public BlockVector3 toWorld(double x, double y, double z) { - // unscale, unoffset, round-nearest return Vector3.at(x, y, z).multiply(unit).add(zero2).toBlockPoint(); }