Optimized plot sorting

This commit is contained in:
boy0001
2015-07-22 03:08:51 +10:00
parent 80e1f07534
commit 59c672d9a8
7 changed files with 174 additions and 61 deletions

View File

@ -317,19 +317,5 @@ public class BukkitSchematicHandler extends SchematicHandler {
});
}
});
// end async
// create schematic one chunk at a time
// load chunk sync
// get blocks async
// add to schematic async
// save final async
}
}

View File

@ -17,6 +17,13 @@ public class MathMan {
return count / array.length;
}
public static int getPositiveId(int i) {
if (i < 0) {
return -i*2 - 1;
}
return i * 2;
}
public static double getSD(double[] array, double av) {
double sd = 0;
for (int i=0; i<array.length;i++)

View File

@ -363,7 +363,6 @@ public abstract class SchematicHandler {
// }
// result.append(buffer, 0, r);
// }
// System.out.print(result.toString() + " | " + result.length());
// if (!result.equals("The file plot.schematic has been uploaded.")) {
// return null;
// }

View File

@ -40,4 +40,9 @@ public class StringMan {
}
return sb.toString();
}
public static boolean isEqual(String a, String b ) {
return (a == b || (a.length() == b.length() && a.hashCode() == b.hashCode() && a.equals(b)));
}
}