mirror of https://github.com/cabaletta/baritone
fix infinite memory usage / crash
This commit is contained in:
parent
8c1ccd6c19
commit
70640246b6
|
@ -115,8 +115,8 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
|||
if (landingSpot != null) {
|
||||
this.pathTo0(landingSpot, true);
|
||||
this.landingSpot = landingSpot;
|
||||
this.goingToLandingSpot = true;
|
||||
}
|
||||
this.goingToLandingSpot = true;
|
||||
}
|
||||
|
||||
if (last != null && ctx.player().getDistanceSqToCenter(last) < 1) {
|
||||
|
@ -504,7 +504,7 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
|||
|
||||
while (!queue.isEmpty()) {
|
||||
BetterBlockPos pos = queue.poll();
|
||||
if (ctx.world().isBlockLoaded(pos) && isInBounds(pos) && ctx.world().getBlockState(pos).getBlock() == Blocks.AIR) {
|
||||
if (ctx.world().isBlockLoaded(pos, false) && isInBounds(pos) && ctx.world().getBlockState(pos).getBlock() == Blocks.AIR) {
|
||||
BetterBlockPos actualLandingSpot = checkLandingSpot(pos, checkedPositions);
|
||||
if (actualLandingSpot != null && isColumnAir(actualLandingSpot, LANDING_COLUMN_HEIGHT) && hasAirBubble(actualLandingSpot.up(LANDING_COLUMN_HEIGHT)) && !badLandingSpots.contains(actualLandingSpot.up(LANDING_COLUMN_HEIGHT))) {
|
||||
return actualLandingSpot.up(LANDING_COLUMN_HEIGHT);
|
||||
|
|
Loading…
Reference in New Issue