add a minimum Y level.

Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
This commit is contained in:
Sam Corbett 2020-10-16 17:02:02 +01:00
parent 5a5d11922f
commit bfb530e02b
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); 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. * 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)) .filter(pos -> !blacklist.contains(pos))
.sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player()::getDistanceSq)) .sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player()::getDistanceSq))