Merge pull request #2079 from scorbett123/limitedMineDistance

add a minimum Y level during mining.
This commit is contained in:
Leijurv 2020-10-30 22:35:26 -07:00 committed by GitHub
commit b16a8ecf21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -738,6 +738,11 @@ public final class Settings {
*/
public final Setting<Integer> maxCachedWorldScanCount = new Setting<>(10);
/**
* Sets the minimum y level whilst mining - set to 0 to turn off.
*/
public final Setting<Integer> minYLevelWhileMining = new Setting<>(0);
/**
* This will only allow baritone to mine exposed ores, can be used to stop ore obfuscators on servers that use them.
*/

View File

@ -417,6 +417,8 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
}
})
.filter(pos -> pos.getY() > Baritone.settings().minYLevelWhileMining.value)
.filter(pos -> !blacklist.contains(pos))
.sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player()::getDistanceSq))