mirror of https://github.com/cabaletta/baritone
Merge branch 'master' into elytra
This commit is contained in:
commit
d892ef54f0
|
@ -635,6 +635,13 @@ public final class Settings {
|
|||
*/
|
||||
public final Setting<Boolean> pruneRegionsFromRAM = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* The chunk packer queue can never grow to larger than this, if it does, the oldest chunks are discarded
|
||||
* <p>
|
||||
* The newest chunks are kept, so that if you're moving in a straight line quickly then stop, your immediate render distance is still included
|
||||
*/
|
||||
public final Setting<Integer> chunkPackerQueueMaxSize = new Setting<>(2000);
|
||||
|
||||
/**
|
||||
* Fill in blocks behind you
|
||||
*/
|
||||
|
@ -737,8 +744,7 @@ public final class Settings {
|
|||
public final Setting<Boolean> freeLook = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Break and place blocks without having to force the client-sided rotations. Having this setting enabled implies
|
||||
* {@link #freeLook}.
|
||||
* Break and place blocks without having to force the client-sided rotations. Requires {@link #freeLook}.
|
||||
*/
|
||||
public final Setting<Boolean> blockFreeLook = new Setting<>(false);
|
||||
|
||||
|
|
|
@ -146,10 +146,10 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||
}
|
||||
|
||||
public Optional<Rotation> getEffectiveRotation() {
|
||||
if (Baritone.settings().freeLook.value || Baritone.settings().blockFreeLook.value) {
|
||||
if (Baritone.settings().freeLook.value) {
|
||||
return Optional.ofNullable(this.serverRotation);
|
||||
}
|
||||
// If neither of the freeLook settings are on, just defer to the player's actual rotations
|
||||
// If freeLook isn't on, just defer to the player's actual rotations
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||
return new Rotation(
|
||||
this.calculateMouseMove(prev.getYaw(), desiredYaw),
|
||||
this.calculateMouseMove(prev.getPitch(), desiredPitch)
|
||||
);
|
||||
).clamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -317,13 +317,13 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
|||
final boolean blockFreeLook = settings.blockFreeLook.value;
|
||||
final boolean freeLook = settings.freeLook.value;
|
||||
|
||||
if (!freeLook) return CLIENT;
|
||||
if (!blockFreeLook && blockInteract) return CLIENT;
|
||||
|
||||
if (ctx.player().isElytraFlying()) {
|
||||
return settings.elytraFreeLook.value ? SERVER : CLIENT;
|
||||
}
|
||||
|
||||
if (!freeLook && !blockFreeLook) return CLIENT;
|
||||
if (!blockFreeLook && blockInteract) return CLIENT;
|
||||
|
||||
// Regardless of if antiCheatCompatibility is enabled, if a blockInteract is requested then the player
|
||||
// rotation needs to be set somehow, otherwise Baritone will halt since objectMouseOver() will just be
|
||||
// whatever the player is mousing over visually. Let's just settle for setting it silently.
|
||||
|
|
|
@ -307,6 +307,9 @@ public final class CachedWorld implements ICachedWorld, Helper {
|
|||
try {
|
||||
ChunkPos pos = toPackQueue.take();
|
||||
Chunk chunk = toPackMap.remove(pos);
|
||||
if (toPackQueue.size() > Baritone.settings().chunkPackerQueueMaxSize.value) {
|
||||
continue;
|
||||
}
|
||||
CachedChunk cached = ChunkPacker.pack(chunk);
|
||||
CachedWorld.this.updateCachedChunk(cached);
|
||||
//System.out.println("Processed chunk at " + chunk.x + "," + chunk.z);
|
||||
|
|
Loading…
Reference in New Issue