1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-22 07:00:55 +00:00
This commit is contained in:
Leijurv 2018-08-01 13:50:15 -04:00
parent 2fdcf8640d
commit cc11310cde
No known key found for this signature in database
GPG Key ID: 0936202430AE187C
6 changed files with 9 additions and 5 deletions

3
.gitignore vendored
View File

@ -54,3 +54,6 @@ nbproject/
/updatenames.sh
/src/minecraft/net
/src/minecraft/mcp
/classes
*.class

View File

@ -392,11 +392,11 @@ public class MickeyMine extends ManagerTick {
}
public static IntegerTuple tupleFromChunk(Chunk chunk) {
return new IntegerTuple(chunk.xPosition, chunk.zPosition);
return new IntegerTuple(chunk.x, chunk.z);
}
public static IntegerTuple tupleFromBlockPos(BlockPos blockPos) {
return tupleFromChunk(Minecraft.getMinecraft().world.getChunkFromBlockCoords(blockPos));
return tupleFromChunk(Minecraft.getMinecraft().world.getChunk(blockPos));
}
@Override

View File

@ -114,7 +114,7 @@ public class PathFinder {
if (actionCost >= Action.COST_INF) {
continue;
}
if (Minecraft.getMinecraft().world.getChunkFromBlockCoords(actionToGetToNeighbor.to) instanceof EmptyChunk) {
if (Minecraft.getMinecraft().world.getChunk(actionToGetToNeighbor.to) instanceof EmptyChunk) {
numEmptyChunk++;
continue;
}

View File

@ -30,7 +30,7 @@ public class SchematicLoader {
private static final HashMap<File, Schematic> cachedSchematics = new HashMap<>();
private SchematicLoader() {
schematicDir = new File(Minecraft.getMinecraft().mcDataDir, "schematics");
schematicDir = new File(Minecraft.getMinecraft().gameDir, "schematics");
schematicDir.mkdir();
for (File file : schematicDir.listFiles(new FileFilter() {
@Override

View File

@ -359,7 +359,7 @@ public class Memory extends Manager {
return n;
}
public static boolean blockLoaded(BlockPos pos) {
return !(Minecraft.getMinecraft().world.getChunkFromBlockCoords(pos) instanceof EmptyChunk);
return !(Minecraft.getMinecraft().world.getChunk(pos) instanceof EmptyChunk);
}
public static String gotoCommand(String targetName) {
for (String name : playerLocationMemory.keySet()) {

View File

@ -60,6 +60,7 @@ public class ToolSet {
item = Item.getByNameOrId("minecraft:apple");
}
//Out.log(inv[i]);
float v = item.getStrVsBlock(new ItemStack(item), b);
//Out.log("v: " + v);
if (v > value) {