This commit is contained in:
Leijurv 2018-08-01 14:13:38 -04:00
parent 119b1b3aca
commit 3a6178513b
No known key found for this signature in database
GPG Key ID: 0936202430AE187C
4 changed files with 11 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
.DS_Store .DS_Store
**/*.swp **/*.swp
/run
# Gradle # Gradle
/build/ /build/
.gradle/ .gradle/

View File

@ -31,6 +31,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World; import net.minecraft.world.World;
/** /**
@ -380,12 +381,11 @@ public class Baritone {
* @return the position of it * @return the position of it
*/ */
public static BlockPos whatAreYouLookingAt() { public static BlockPos whatAreYouLookingAt() {
/*Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) { if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.BLOCK) {
return mc.objectMouseOver.getBlockPos(); return mc.objectMouseOver.getBlockPos();
} }
return null;*/ return null;
throw new UnsupportedOperationException("need to figure out what RayTraceResult is in 1.12.2");
} }
public static void switchToBestTool() { public static void switchToBestTool() {
@ -409,12 +409,11 @@ public class Baritone {
} }
public static Entity whatEntityAreYouLookingAt() { public static Entity whatEntityAreYouLookingAt() {
/*Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.ENTITY) { if (mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == RayTraceResult.Type.ENTITY) {
return mc.objectMouseOver.entityHit; 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<String> getDebugGui() { public static List<String> getDebugGui() {

View File

@ -125,7 +125,7 @@ public abstract class Action {
Block b = state.getBlock(); Block b = state.getBlock();
Material m = b.getMaterial(state); Material m = b.getMaterial(state);
if (b instanceof BlockLiquid) { 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 BlockLiquid.getFlow(Minecraft.getMinecraft().world, pos, state) != -1000.0D;
} }
return false; return false;

View File

@ -23,6 +23,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.chunk.EmptyChunk; import net.minecraft.world.chunk.EmptyChunk;
@ -343,7 +344,7 @@ public class Memory extends Manager {
public static final int SCAN_DIST = 50; public static final int SCAN_DIST = 50;
public static void scanBlock(BlockPos pos) { public static void scanBlock(BlockPos pos) {
Block block = Baritone.get(pos).getBlock(); Block block = Baritone.get(pos).getBlock();
if (air.equals(block)) { if (Blocks.AIR.equals(block)) {
return; return;
} }
BlockMemory memory = getMemory(block); BlockMemory memory = getMemory(block);