From b6c91b506207e81059f24e57914d699a62500b0c Mon Sep 17 00:00:00 2001 From: Logan Darklock Date: Fri, 30 Aug 2019 17:13:09 -0700 Subject: [PATCH] speed up cache stuff --- src/main/java/baritone/cache/CachedChunk.java | 10 ---------- src/main/java/baritone/process/MineProcess.java | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/baritone/cache/CachedChunk.java b/src/main/java/baritone/cache/CachedChunk.java index 148b21e7..67ac6942 100644 --- a/src/main/java/baritone/cache/CachedChunk.java +++ b/src/main/java/baritone/cache/CachedChunk.java @@ -91,16 +91,6 @@ public final class CachedChunk { Blocks.VINE ); - public static boolean tracked(Block block) { - for (Block tracked : BLOCKS_TO_KEEP_TRACK_OF) { - if (tracked == block) { - return true; - } - } - - return false; - } - /** * The size of the chunk data in bits. Equal to 16 KiB. diff --git a/src/main/java/baritone/process/MineProcess.java b/src/main/java/baritone/process/MineProcess.java index 75648ae1..c253cdf8 100644 --- a/src/main/java/baritone/process/MineProcess.java +++ b/src/main/java/baritone/process/MineProcess.java @@ -318,7 +318,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro List untracked = new ArrayList<>(); for (BlockOptionalMeta bom : filter.blocks()) { Block block = bom.getBlock(); - if (CachedChunk.tracked(block)) { + if (CachedChunk.BLOCKS_TO_KEEP_TRACK_OF.contains(block)) { BetterBlockPos pf = ctx.baritone.getPlayerContext().playerFeet(); locs.addAll(ctx.worldData.getCachedWorld().getLocationsOf(