Fix expression evaluation method used for generatebiome

#32
Dieser Commit ist enthalten in:
dordsor21 2021-09-22 15:03:03 +01:00
Ursprung 4400b0f83e
Commit d25a85e0d4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -3566,7 +3566,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
double scaledZ = (z - zero.getZ()) / unit.getZ(); double scaledZ = (z - zero.getZ()) / unit.getZ();
try { try {
if (expression.evaluate(timeout, scaledX, scaledY, scaledZ) <= 0) { if (expression.evaluate(new double[]{scaledX, scaledY, scaledZ}, timeout) <= 0) {
return null; return null;
} }

Datei anzeigen

@ -443,7 +443,8 @@ public class GenerationCommands {
@Selection Region region, @Selection Region region,
@Arg(desc = "The biome type to set") @Arg(desc = "The biome type to set")
BiomeType target, 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, List<String> expression,
@Switch(name = 'h', desc = "Generate a hollow shape") @Switch(name = 'h', desc = "Generate a hollow shape")
boolean hollow, boolean hollow,