mirror of https://github.com/cabaletta/baritone
merge
This commit is contained in:
commit
ead6edc574
|
@ -38,6 +38,7 @@ And finally `GoalComposite`. `GoalComposite` is a list of other goals, any one o
|
||||||
Things it doesn't have yet
|
Things it doesn't have yet
|
||||||
- Trapdoors
|
- Trapdoors
|
||||||
- Sprint jumping in a 1x2 corridor
|
- Sprint jumping in a 1x2 corridor
|
||||||
|
- Parkour (jumping over gaps of any length) [IN PROGRESS]
|
||||||
|
|
||||||
See <a href="https://github.com/cabaletta/baritone/issues">issues</a> for more.
|
See <a href="https://github.com/cabaletta/baritone/issues">issues</a> for more.
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class GoalGetToBlock implements Goal {
|
||||||
int xDiff = pos.getX() - this.x;
|
int xDiff = pos.getX() - this.x;
|
||||||
int yDiff = pos.getY() - this.y;
|
int yDiff = pos.getY() - this.y;
|
||||||
int zDiff = pos.getZ() - this.z;
|
int zDiff = pos.getZ() - this.z;
|
||||||
if (yDiff == -2 && xDiff == 0 && zDiff == 0) {
|
if (yDiff < 0) {
|
||||||
return true;
|
yDiff++;
|
||||||
}
|
}
|
||||||
return Math.abs(xDiff) + Math.abs(yDiff) + Math.abs(zDiff) <= 1;
|
return Math.abs(xDiff) + Math.abs(yDiff) + Math.abs(zDiff) <= 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class GoalGetToBlockTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void isInGoal() {
|
public void isInGoal() {
|
||||||
List<String> acceptableOffsets = new ArrayList<>(Arrays.asList("0,0,0", "0,0,1", "0,0,-1", "1,0,0", "-1,0,0", "0,1,0", "0,-1,0", "0,-2,0"));
|
List<String> acceptableOffsets = new ArrayList<>(Arrays.asList("0,0,0", "0,0,1", "0,0,-1", "1,0,0", "-1,0,0", "0,-1,1", "0,-1,-1", "1,-1,0", "-1,-1,0", "0,1,0", "0,-1,0", "0,-2,0"));
|
||||||
for (int x = -10; x <= 10; x++) {
|
for (int x = -10; x <= 10; x++) {
|
||||||
for (int y = -10; y <= 10; y++) {
|
for (int y = -10; y <= 10; y++) {
|
||||||
for (int z = -10; z <= 10; z++) {
|
for (int z = -10; z <= 10; z++) {
|
||||||
|
|
Loading…
Reference in New Issue