From d25a85e0d4f1ee179bf26ff170a31a8baeb78946 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 22 Sep 2021 15:03:03 +0100 Subject: [PATCH] Fix expression evaluation method used for generatebiome #32 --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 2 +- .../java/com/sk89q/worldedit/command/GenerationCommands.java | 3 ++- 2 files changed, 3 insertions(+), 2 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 159fcf0be..ca4700db6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -3566,7 +3566,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { double scaledZ = (z - zero.getZ()) / unit.getZ(); try { - if (expression.evaluate(timeout, scaledX, scaledY, scaledZ) <= 0) { + if (expression.evaluate(new double[]{scaledX, scaledY, scaledZ}, timeout) <= 0) { return null; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java index 54f78e983..d63f26e52 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java @@ -443,7 +443,8 @@ public class GenerationCommands { @Selection Region region, @Arg(desc = "The biome type to set") BiomeType target, - @Arg(desc = "Expression to test block placement locations and set biome type", variable = true) + @Arg(desc = "Expression to test block placement locations and set biome type. Requires x,y,z variables be present", + variable = true) List expression, @Switch(name = 'h', desc = "Generate a hollow shape") boolean hollow,