speed up cache stuff

This commit is contained in:
Logan Darklock 2019-08-30 17:13:09 -07:00
parent fe47245b73
commit b6c91b5062
No known key found for this signature in database
GPG Key ID: B8C37CEDE1AC60EA
2 changed files with 1 additions and 11 deletions
src/main/java/baritone

View File

@ -91,16 +91,6 @@ public final class CachedChunk {
Blocks.VINE 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. * The size of the chunk data in bits. Equal to 16 KiB.

View File

@ -318,7 +318,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
List<Block> untracked = new ArrayList<>(); List<Block> untracked = new ArrayList<>();
for (BlockOptionalMeta bom : filter.blocks()) { for (BlockOptionalMeta bom : filter.blocks()) {
Block block = bom.getBlock(); Block block = bom.getBlock();
if (CachedChunk.tracked(block)) { if (CachedChunk.BLOCKS_TO_KEEP_TRACK_OF.contains(block)) {
BetterBlockPos pf = ctx.baritone.getPlayerContext().playerFeet(); BetterBlockPos pf = ctx.baritone.getPlayerContext().playerFeet();
locs.addAll(ctx.worldData.getCachedWorld().getLocationsOf( locs.addAll(ctx.worldData.getCachedWorld().getLocationsOf(