Add maxYLevelWhileMining setting

This commit is contained in:
ZacSharp 2023-04-24 13:15:06 +02:00
parent 5f2eadbfa6
commit e4cd35ac33
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
2 changed files with 7 additions and 0 deletions

View File

@ -853,6 +853,11 @@ public final class Settings {
*/
public final Setting<Integer> minYLevelWhileMining = new Setting<>(0);
/**
* Sets the maximum y level to mine ores at.
*/
public final Setting<Integer> maxYLevelWhileMining = new Setting<>(255); // 1.17+ defaults to maximum possible world height
/**
* This will only allow baritone to mine exposed ores, can be used to stop ore obfuscators on servers that use them.
*/

View File

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