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