diff --git a/src/main/java/baritone/cache/WorldData.java b/src/main/java/baritone/cache/WorldData.java index 6899284c..19461d22 100644 --- a/src/main/java/baritone/cache/WorldData.java +++ b/src/main/java/baritone/cache/WorldData.java @@ -31,7 +31,7 @@ import java.nio.file.Path; */ public class WorldData implements IWorldData { - private final CachedWorld cache; + public final CachedWorld cache; private final Waypoints waypoints; //public final MapData map; public final Path directory; diff --git a/src/main/java/baritone/utils/BlockStateInterface.java b/src/main/java/baritone/utils/BlockStateInterface.java index f0ee8d3f..068721cd 100644 --- a/src/main/java/baritone/utils/BlockStateInterface.java +++ b/src/main/java/baritone/utils/BlockStateInterface.java @@ -18,7 +18,7 @@ package baritone.utils; import baritone.Baritone; -import baritone.api.cache.ICachedRegion; +import baritone.cache.CachedRegion; import baritone.cache.WorldData; import baritone.cache.WorldProvider; import net.minecraft.block.Block; @@ -36,7 +36,7 @@ import net.minecraft.world.chunk.Chunk; public class BlockStateInterface implements Helper { private static Chunk prev = null; - private static ICachedRegion prevCached = null; + private static CachedRegion prevCached = null; private static IBlockState AIR = Blocks.AIR.getDefaultState(); @@ -70,13 +70,13 @@ public class BlockStateInterface implements Helper { } // same idea here, skip the Long2ObjectOpenHashMap.get if at all possible // except here, it's 512x512 tiles instead of 16x16, so even better repetition - ICachedRegion cached = prevCached; + CachedRegion cached = prevCached; if (cached == null || cached.getX() != x >> 9 || cached.getZ() != z >> 9) { WorldData world = WorldProvider.INSTANCE.getCurrentWorld(); if (world == null) { return AIR; } - ICachedRegion region = world.getCachedWorld().getRegion(x >> 9, z >> 9); + CachedRegion region = world.cache.getRegion(x >> 9, z >> 9); if (region == null) { return AIR; } @@ -100,7 +100,7 @@ public class BlockStateInterface implements Helper { prev = prevChunk; return true; } - ICachedRegion prevRegion = prevCached; + CachedRegion prevRegion = prevCached; if (prevRegion != null && prevRegion.getX() == x >> 9 && prevRegion.getZ() == z >> 9) { return prevRegion.isCached(x & 511, z & 511); } @@ -108,7 +108,7 @@ public class BlockStateInterface implements Helper { if (world == null) { return false; } - prevRegion = world.getCachedWorld().getRegion(x >> 9, z >> 9); + prevRegion = world.cache.getRegion(x >> 9, z >> 9); if (prevRegion == null) { return false; }