From 0b9bb9df2b9a07b3ddcd57c8329804574409a52d Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Mon, 17 Aug 2020 18:56:32 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Apply=20review=20suggestions=20f?= =?UTF-8?q?rom=20leijurv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 12 ++++++------ src/main/java/baritone/cache/CachedWorld.java | 1 + src/main/java/baritone/process/BuilderProcess.java | 6 +++--- src/main/java/baritone/process/MineProcess.java | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index b510fa3e2..04c8fdbf4 100755 --- a/build.gradle +++ b/build.gradle @@ -24,13 +24,13 @@ buildscript { name = 'forge' url = 'http://files.minecraftforge.net/maven' } - maven { - url = 'https://www.dogforce-games.com/maven/' - } maven { name = 'impactdevelopment-repo' url = 'https://impactdevelopment.github.io/maven/' } + maven { + url = 'https://www.dogforce-games.com/maven/' + } jcenter() } @@ -141,13 +141,13 @@ repositories { name = 'spongepowered-repo' url = 'http://repo.spongepowered.org/maven/' } - maven { - url = 'https://www.dogforce-games.com/maven/' - } maven { name = 'impactdevelopment-repo' url = 'https://impactdevelopment.github.io/maven/' } + maven { + url = 'https://www.dogforce-games.com/maven/' + } } dependencies { diff --git a/src/main/java/baritone/cache/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java index 634a79040..20f554e6c 100644 --- a/src/main/java/baritone/cache/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -28,6 +28,7 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; import net.minecraft.util.RegistryKey; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import java.io.IOException; diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index c4b55b5c8..b04c07ada 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -795,13 +795,13 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil if (desired == null) { return true; } - if (current.getBlock() instanceof BlockLiquid && Baritone.settings().okIfWater.value) { + if (current.getBlock() instanceof FlowingFluidBlock && Baritone.settings().okIfWater.value) { return true; } - if (current.getBlock() instanceof BlockAir && Baritone.settings().okIfAir.value.contains(desired.getBlock())) { + if (current.getBlock() instanceof AirBlock && Baritone.settings().okIfAir.value.contains(desired.getBlock())) { return true; } - if (desired.getBlock() instanceof BlockAir && Baritone.settings().buildIgnoreBlocks.value.contains(current.getBlock())) { + if (desired.getBlock() instanceof AirBlock && Baritone.settings().buildIgnoreBlocks.value.contains(current.getBlock())) { return true; } // TODO more complicated comparison logic I guess diff --git a/src/main/java/baritone/process/MineProcess.java b/src/main/java/baritone/process/MineProcess.java index 3609827b7..3991d8db4 100644 --- a/src/main/java/baritone/process/MineProcess.java +++ b/src/main/java/baritone/process/MineProcess.java @@ -89,7 +89,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro if (Baritone.settings().desktopNotifications.value && Baritone.settings().notificationOnMineFail.value) { NotificationHelper.notify("Unable to find any path to " + filter + ", blacklisting presumably unreachable closest instance...", true); } - knownOreLocations.stream().min(Comparator.comparingDouble(ctx.player()::distanceSq)).ifPresent(blacklist::add); + knownOreLocations.stream().min(Comparator.comparingDouble(ctx.playerFeet()::distanceSq)).ifPresent(blacklist::add); knownOreLocations.removeIf(blacklist::contains); } else { logDirect("Unable to find any path to " + filter + ", canceling mine");