forked from RepoMirrors/kami-blue
Added ignored Try-Catch "//to fix ghost chunks get loaded and generating NullPointerExceptions"
This commit is contained in:
parent
c9b9a9aa30
commit
ac7bbc16a1
|
@ -245,14 +245,16 @@ public class Search extends Module {
|
|||
BlockPos pos2 = new BlockPos(chunk.getPos().getXEnd(), 256, chunk.getPos().getZEnd());
|
||||
Iterable<BlockPos> blocks = BlockPos.getAllInBox(pos1, pos2);
|
||||
Map<BlockPos, Tuple<Integer, Integer>> foundBlocks = new HashMap<>();
|
||||
for (BlockPos blockPos : blocks) {
|
||||
int side = GeometryMasks.Quad.ALL;
|
||||
Block block = mc.world.getBlockState(blockPos).getBlock();
|
||||
if (blocksToFind.contains(block)) {
|
||||
Tuple<Integer, Integer> tuple = getTuple(side, block);
|
||||
foundBlocks.put(blockPos, tuple);
|
||||
try {
|
||||
for (BlockPos blockPos : blocks) {
|
||||
int side = GeometryMasks.Quad.ALL;
|
||||
Block block = mc.world.getBlockState(blockPos).getBlock();
|
||||
if (blocksToFind.contains(block)) {
|
||||
Tuple<Integer, Integer> tuple = getTuple(side, block);
|
||||
foundBlocks.put(blockPos, tuple);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (NullPointerException ignored){} //to fix ghost chunks get loaded and generating NullPointerExceptions
|
||||
return foundBlocks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue