relative coordinates

This commit is contained in:
Leijurv 2019-03-13 08:50:04 -07:00
parent e09541151f
commit ee6df270ce
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -634,7 +634,7 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
}
private int parseOrDefault(String str, int i) {
return str.equals("~") ? i : Integer.parseInt(str);
return str.equals("~") ? i : str.startsWith("~") ? Integer.parseInt(str.substring(1)) + i : Integer.parseInt(str);
}
private void log(List<ItemStack> stacks) {