mirror of
https://github.com/cabaletta/baritone
synced 2024-12-24 07:52:54 +00:00
gotta go fast
This commit is contained in:
parent
1ad6a0d5b5
commit
5f29bb3e7f
@ -46,6 +46,8 @@ public class BlockStateInterface {
|
||||
private Chunk prev = null;
|
||||
private CachedRegion prevCached = null;
|
||||
|
||||
private final boolean useTheRealWorld;
|
||||
|
||||
private static final IBlockState AIR = Blocks.AIR.getDefaultState();
|
||||
|
||||
public BlockStateInterface(IPlayerContext ctx) {
|
||||
@ -64,6 +66,7 @@ public class BlockStateInterface {
|
||||
} else {
|
||||
this.loadedChunks = worldLoaded; // this will only be used on the main thread
|
||||
}
|
||||
this.useTheRealWorld = !Baritone.settings().pathThroughCachedOnly.get();
|
||||
if (!Minecraft.getMinecraft().isCallingFromMinecraftThread()) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
@ -94,7 +97,7 @@ public class BlockStateInterface {
|
||||
return AIR;
|
||||
}
|
||||
|
||||
if (!Baritone.settings().pathThroughCachedOnly.get()) {
|
||||
if (useTheRealWorld) {
|
||||
Chunk cached = prev;
|
||||
// there's great cache locality in block state lookups
|
||||
// generally it's within each movement
|
||||
|
Loading…
Reference in New Issue
Block a user