Fix expression evaluation method used for generatebiome

#32
This commit is contained in:
dordsor21 2021-09-22 15:03:03 +01:00
parent 4400b0f83e
commit d25a85e0d4
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}

View File

@ -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<String> expression,
@Switch(name = 'h', desc = "Generate a hollow shape")
boolean hollow,