removed misleading sort functions

This commit is contained in:
SpaceToad 2014-04-30 21:23:33 +02:00
parent 931f22d5be
commit 6364fc7a54
2 changed files with 1 additions and 34 deletions

View file

@ -137,9 +137,6 @@ public class BptBuilderBlueprint extends BptBuilderBase {
}
}
Collections.sort(tmpStandalone);
Collections.sort(tmpLastBlocks);
buildList.addAll(tmpStandalone);
buildList.addAll(tmpLastBlocks);

View file

@ -21,7 +21,7 @@ import buildcraft.api.blueprints.SchematicMask;
import buildcraft.api.core.BuildCraftAPI;
import buildcraft.api.core.Position;
public class BuildingSlotBlock extends BuildingSlot implements Comparable<BuildingSlotBlock> {
public class BuildingSlotBlock extends BuildingSlot {
public int x, y, z;
public SchematicBlockBase schematic;
@ -86,36 +86,6 @@ public class BuildingSlotBlock extends BuildingSlot implements Comparable<Buildi
}
}
@Override
public int compareTo(BuildingSlotBlock o) {
if (o.schematic instanceof Comparable && schematic instanceof Comparable ) {
Comparable comp1 = (Comparable) schematic;
Comparable comp2 = (Comparable) o.schematic;
int cmp = comp1.compareTo(comp2);
if (cmp != 0) {
return cmp;
}
}
if (y < o.y) {
return -1;
} else if (y > o.y) {
return 1;
} else if (x < o.x) {
return -1;
} else if (x > o.x) {
return 1;
} else if (z < o.z) {
return -1;
} else if (z > o.z) {
return 1;
} else {
return 0;
}
}
@Override
public Position getDestination () {
return new Position (x + 0.5, y + 0.5, z + 0.5);