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 /updatenames.sh
/src/minecraft/net /src/minecraft/net
/src/minecraft/mcp /src/minecraft/mcp
/classes
*.class

View File

@ -392,11 +392,11 @@ public class MickeyMine extends ManagerTick {
} }
public static IntegerTuple tupleFromChunk(Chunk chunk) { 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) { public static IntegerTuple tupleFromBlockPos(BlockPos blockPos) {
return tupleFromChunk(Minecraft.getMinecraft().world.getChunkFromBlockCoords(blockPos)); return tupleFromChunk(Minecraft.getMinecraft().world.getChunk(blockPos));
} }
@Override @Override

View File

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

View File

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

View File

@ -359,7 +359,7 @@ public class Memory extends Manager {
return n; return n;
} }
public static boolean blockLoaded(BlockPos pos) { 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) { public static String gotoCommand(String targetName) {
for (String name : playerLocationMemory.keySet()) { for (String name : playerLocationMemory.keySet()) {

View File

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