From 3a6178513b832e100ae55f43e867f4ea9a034365 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 1 Aug 2018 14:13:38 -0400 Subject: [PATCH] aoeu --- .gitignore | 2 ++ src/main/java/baritone/Baritone.java | 13 ++++++------- .../java/baritone/pathfinding/actions/Action.java | 2 +- src/main/java/baritone/util/Memory.java | 3 ++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 68f3f895..7f217933 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .DS_Store **/*.swp +/run + # Gradle /build/ .gradle/ diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index 20f42367..9be75e11 100644 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -31,6 +31,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; /** @@ -380,12 +381,11 @@ public class Baritone { * @return the position of it */ public static BlockPos whatAreYouLookingAt() { - /*Minecraft mc = Minecraft.getMinecraft(); + Minecraft mc = Minecraft.getMinecraft(); if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) { return mc.objectMouseOver.getBlockPos(); } - return null;*/ - throw new UnsupportedOperationException("need to figure out what RayTraceResult is in 1.12.2"); + return null; } public static void switchToBestTool() { @@ -409,12 +409,11 @@ public class Baritone { } public static Entity whatEntityAreYouLookingAt() { - /*Minecraft mc = Minecraft.getMinecraft(); + Minecraft mc = Minecraft.getMinecraft(); if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.ENTITY) { return mc.objectMouseOver.entityHit; - }*/ - throw new UnsupportedOperationException("need to figure out what RayTraceResult is in 1.12.2"); - //return null; + } + return null; } public static List getDebugGui() { diff --git a/src/main/java/baritone/pathfinding/actions/Action.java b/src/main/java/baritone/pathfinding/actions/Action.java index e48ac790..23ce5285 100644 --- a/src/main/java/baritone/pathfinding/actions/Action.java +++ b/src/main/java/baritone/pathfinding/actions/Action.java @@ -125,7 +125,7 @@ public abstract class Action { Block b = state.getBlock(); Material m = b.getMaterial(state); if (b instanceof BlockLiquid) { - throw new UnsupportedOperationException("TODO"); + System.out.println("Need to fix get flow check!!!"); //return BlockLiquid.getFlow(Minecraft.getMinecraft().world, pos, state) != -1000.0D; } return false; diff --git a/src/main/java/baritone/util/Memory.java b/src/main/java/baritone/util/Memory.java index 481e6ec0..f1c612b9 100644 --- a/src/main/java/baritone/util/Memory.java +++ b/src/main/java/baritone/util/Memory.java @@ -23,6 +23,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.util.math.BlockPos; import net.minecraft.world.chunk.EmptyChunk; @@ -343,7 +344,7 @@ public class Memory extends Manager { public static final int SCAN_DIST = 50; public static void scanBlock(BlockPos pos) { Block block = Baritone.get(pos).getBlock(); - if (air.equals(block)) { + if (Blocks.AIR.equals(block)) { return; } BlockMemory memory = getMemory(block);