From 5f29bb3e7f4a98d8bdbd2b82e317083d8da4c01d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 10 Jan 2019 18:55:55 -0800 Subject: [PATCH] gotta go fast --- src/main/java/baritone/utils/BlockStateInterface.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BlockStateInterface.java b/src/main/java/baritone/utils/BlockStateInterface.java index be49c97c9..5f8cac6ad 100644 --- a/src/main/java/baritone/utils/BlockStateInterface.java +++ b/src/main/java/baritone/utils/BlockStateInterface.java @@ -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