tweak block scanning, fixes #200
This commit is contained in:
parent
5ef03ba1d5
commit
f2e02794b8
@ -35,7 +35,7 @@ public final class CachedChunk {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
HashSet<Block> temp = new HashSet<>();
|
HashSet<Block> temp = new HashSet<>();
|
||||||
temp.add(Blocks.DIAMOND_ORE);
|
//temp.add(Blocks.DIAMOND_ORE);
|
||||||
temp.add(Blocks.DIAMOND_BLOCK);
|
temp.add(Blocks.DIAMOND_BLOCK);
|
||||||
//temp.add(Blocks.COAL_ORE);
|
//temp.add(Blocks.COAL_ORE);
|
||||||
temp.add(Blocks.COAL_BLOCK);
|
temp.add(Blocks.COAL_BLOCK);
|
||||||
|
@ -93,10 +93,7 @@ public final class ChunkPacker {
|
|||||||
IBlockState[] blocks = new IBlockState[256];
|
IBlockState[] blocks = new IBlockState[256];
|
||||||
|
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
// @formatter:off
|
https://www.ibm.com/developerworks/library/j-perry-writing-good-java-code/index.html
|
||||||
https:
|
|
||||||
//www.ibm.com/developerworks/library/j-perry-writing-good-java-code/index.html
|
|
||||||
// @formatter:on
|
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int y = 255; y >= 0; y--) {
|
for (int y = 255; y >= 0; y--) {
|
||||||
int index = CachedChunk.getPositionIndex(x, y, z);
|
int index = CachedChunk.getPositionIndex(x, y, z);
|
||||||
|
@ -210,7 +210,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro
|
|||||||
//long b = System.currentTimeMillis();
|
//long b = System.currentTimeMillis();
|
||||||
for (Block m : mining) {
|
for (Block m : mining) {
|
||||||
if (CachedChunk.BLOCKS_TO_KEEP_TRACK_OF.contains(m)) {
|
if (CachedChunk.BLOCKS_TO_KEEP_TRACK_OF.contains(m)) {
|
||||||
locs.addAll(ctx.worldData().getCachedWorld().getLocationsOf(ChunkPacker.blockToString(m), 1, ctx.getBaritone().getPlayerContext().playerFeet().getX(), ctx.getBaritone().getPlayerContext().playerFeet().getZ(), 1));
|
locs.addAll(ctx.worldData().getCachedWorld().getLocationsOf(ChunkPacker.blockToString(m), 1, ctx.getBaritone().getPlayerContext().playerFeet().getX(), ctx.getBaritone().getPlayerContext().playerFeet().getZ(), 2));
|
||||||
} else {
|
} else {
|
||||||
uninteresting.add(m);
|
uninteresting.add(m);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user