Merge pull request #3579 from lucasarden/master

Stop backfill from filling while paused
This commit is contained in:
Leijurv 2022-10-03 12:23:02 -07:00 committed by GitHub
commit 55273b5340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,12 +56,12 @@ public final class BackfillProcess extends BaritoneProcessHelper {
Baritone.settings().backfill.value = false;
return false;
}
amIBreakingABlockHMMMMMMM();
for (BlockPos pos : new ArrayList<>(blocksToReplace.keySet())) {
if (ctx.world().getChunk(pos) instanceof EmptyChunk) {
if (ctx.world().getChunk(pos) instanceof EmptyChunk || ctx.world().getBlockState(pos).getBlock() != Blocks.AIR) {
blocksToReplace.remove(pos);
}
}
amIBreakingABlockHMMMMMMM();
baritone.getInputOverrideHandler().clearAllKeys();
return !toFillIn().isEmpty();
@ -93,7 +93,7 @@ public final class BackfillProcess extends BaritoneProcessHelper {
}
private void amIBreakingABlockHMMMMMMM() {
if (!ctx.getSelectedBlock().isPresent()) {
if (!ctx.getSelectedBlock().isPresent() || !baritone.getPathingBehavior().isPathing()) {
return;
}
blocksToReplace.put(ctx.getSelectedBlock().get(), ctx.world().getBlockState(ctx.getSelectedBlock().get()));