refactor problematic area

This commit is contained in:
Leijurv 2018-10-11 20:36:18 -07:00
parent c2adcdb051
commit 773ad89951
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -110,8 +110,7 @@ public final class MineBehavior extends Behavior implements IMineBehavior, Helpe
locationsCache = locs;
}
public GoalComposite coalesce(List<BlockPos> locs) {
return new GoalComposite(locs.stream().map(loc -> {
public Goal coalesce(BlockPos loc, List<BlockPos> locs) {
if (!Baritone.settings().forceInternalMining.get()) {
return new GoalTwoBlocks(loc);
}
@ -131,7 +130,10 @@ public final class MineBehavior extends Behavior implements IMineBehavior, Helpe
return new GoalTwoBlocks(loc);
}
}
}).toArray(Goal[]::new));
}
public GoalComposite coalesce(List<BlockPos> locs) {
return new GoalComposite(locs.stream().map(loc -> coalesce(loc, locs)).toArray(Goal[]::new));
}
public List<BlockPos> scanFor(List<Block> mining, int max) {