taxicab only

This commit is contained in:
Leijurv 2019-04-27 16:01:58 -07:00
parent 9118e0b368
commit b1ee23ad50
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 1 additions and 8 deletions

View File

@ -729,13 +729,6 @@ public final class Settings {
*/ */
public final Setting<Integer> followRadius = new Setting<>(3); public final Setting<Integer> followRadius = new Setting<>(3);
/**
* true = exploration uses pythagorean distance to choose closest uncached chunk
* <p>
* false = exploration uses manhattan / taxicab distance to choose
*/
public final Setting<Boolean> exploreUsePythagorean = new Setting<>(false);
/** /**
* Turn this on if your exploration filter is enormous, you don't want it to check if it's done, * Turn this on if your exploration filter is enormous, you don't want it to check if it's done,
* and you are just fine with it just hanging on completion * and you are just fine with it just hanging on completion

View File

@ -105,7 +105,7 @@ public class ExploreProcess extends BaritoneProcessHelper implements IExplorePro
List<BlockPos> centers = new ArrayList<>(); List<BlockPos> centers = new ArrayList<>();
for (int dx = -dist; dx <= dist; dx++) { for (int dx = -dist; dx <= dist; dx++) {
for (int dz = -dist; dz <= dist; dz++) { for (int dz = -dist; dz <= dist; dz++) {
int trueDist = Baritone.settings().exploreUsePythagorean.value ? dx * dx + dz * dz : Math.abs(dx) + Math.abs(dz); int trueDist = Math.abs(dx) + Math.abs(dz);
if (trueDist != dist) { if (trueDist != dist) {
continue; // not considering this one just yet in our expanding search continue; // not considering this one just yet in our expanding search
} }