configurable block reach distance

This commit is contained in:
Leijurv 2019-10-26 16:01:08 -07:00
parent f02c33d95a
commit 2ae16d8bb1
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 7 additions and 1 deletions

View File

@ -248,6 +248,11 @@ public final class Settings {
*/
public final Setting<Integer> rightClickSpeed = new Setting<>(4);
/**
* Block reach distance
*/
public final Setting<Float> blockReachDistance = new Setting<>(4.5f);
/**
* How many degrees to randomize the pitch and yaw every tick. Set to 0 to disable
*/

View File

@ -17,6 +17,7 @@
package baritone.api.utils;
import baritone.api.BaritoneAPI;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ClickType;
@ -56,6 +57,6 @@ public interface IPlayerController {
void setHittingBlock(boolean hittingBlock);
default double getBlockReachDistance() {
return this.getGameType().isCreative() ? 5.0F : 4.5F;
return this.getGameType().isCreative() ? 5.0F : BaritoneAPI.getSettings().blockReachDistance.value;
}
}