Merge pull request #808 from reb0rt/patch-2

Stop parseGoal from removing the last argument (when it shouldn't)
This commit is contained in:
Leijurv 2019-08-17 21:13:54 -07:00
commit cca137d526
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ import net.minecraft.world.chunk.Chunk;
import java.nio.file.Path;
import java.util.*;
import static org.apache.commons.lang3.StringUtils.isNumeric;
import static org.apache.commons.lang3.math.NumberUtils.isCreatable;
public class ExampleBaritoneControl implements Helper, AbstractGameEventListener {
private static final String COMMAND_PREFIX = "#";
@ -694,7 +694,7 @@ public class ExampleBaritoneControl implements Helper, AbstractGameEventListener
BetterBlockPos playerFeet = ctx.playerFeet();
int length = params.length - 1; // length has to be smaller when a dimension parameter is added
if (params.length < 1 || (isNumeric(params[params.length - 1]) || params[params.length - 1].startsWith("~"))) {
if (params.length < 1 || (isCreatable(params[params.length - 1]) || params[params.length - 1].startsWith("~"))) {
length = params.length;
}
switch (length) {