makes mining faster, fixes #330

This commit is contained in:
Leijurv 2019-02-08 12:08:34 -08:00
parent d0d8b12fb8
commit e37a09a1c8
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 8 additions and 0 deletions

View File

@ -250,6 +250,14 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
public static List<BlockPos> prune(CalculationContext ctx, List<BlockPos> locs2, List<Block> mining, int max) {
List<BlockPos> dropped = droppedItemsScan(mining, ctx.world);
dropped.removeIf(drop -> {
for (BlockPos pos : locs2) {
if (mining.contains(ctx.getBlock(pos.getX(), pos.getY(), pos.getZ())) && MineProcess.plausibleToBreak(ctx.bsi, pos) && pos.distanceSq(drop) <= 9) { // TODO maybe drop also has to be supported? no lava below?
return true;
}
}
return false;
});
List<BlockPos> locs = locs2
.stream()
.distinct()