fix stupid minebehavior bug

This commit is contained in:
Leijurv 2018-11-03 20:25:09 -07:00
parent c37a5ba956
commit c614d7ec6a
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -94,7 +94,7 @@ public final class MineBehavior extends Behavior implements IMineBehavior, Helpe
List<BlockPos> locs2 = prune(new ArrayList<>(locs), mining, 64); List<BlockPos> locs2 = prune(new ArrayList<>(locs), mining, 64);
// can't reassign locs, gotta make a new var locs2, because we use it in a lambda right here, and variables you use in a lambda must be effectively final // can't reassign locs, gotta make a new var locs2, because we use it in a lambda right here, and variables you use in a lambda must be effectively final
baritone.getPathingBehavior().setGoalAndPath(new GoalComposite(locs2.stream().map(loc -> coalesce(loc, locs2)).toArray(Goal[]::new))); baritone.getPathingBehavior().setGoalAndPath(new GoalComposite(locs2.stream().map(loc -> coalesce(loc, locs2)).toArray(Goal[]::new)));
knownOreLocations = locs; knownOreLocations = locs2;
return; return;
} }
// we don't know any ore locations at the moment // we don't know any ore locations at the moment