added notion of standalone block in schematic, fix #1650

This commit is contained in:
SpaceToad 2014-04-30 20:36:29 +02:00
parent 708b9b63cd
commit c657fee0a1
2 changed files with 14 additions and 9 deletions

View file

@ -93,8 +93,8 @@ public class BptBuilderBlueprint extends BptBuilderBase {
}
}
LinkedList<BuildingSlotBlock> tmpBuildCubeList = new LinkedList<BuildingSlotBlock>();
LinkedList<BuildingSlotBlock> tmpBuildComplexList = new LinkedList<BuildingSlotBlock>();
LinkedList<BuildingSlotBlock> tmpStandalone = new LinkedList<BuildingSlotBlock>();
LinkedList<BuildingSlotBlock> tmpLastBlocks = new LinkedList<BuildingSlotBlock>();
for (int j = 0; j < blueprint.sizeY; ++j) {
for (int i = 0; i < blueprint.sizeX; ++i) {
@ -119,11 +119,11 @@ public class BptBuilderBlueprint extends BptBuilderBase {
if (!builtLocations.contains(new BlockIndex(xCoord, yCoord,
zCoord))) {
if (((SchematicBlock) b.schematic).block.isOpaqueCube()) {
tmpBuildCubeList.add(b);
if (slot.isStandalone()) {
tmpStandalone.add(b);
b.buildStage = 1;
} else {
tmpBuildComplexList.add(b);
tmpLastBlocks.add(b);
b.buildStage = 2;
}
} else {
@ -133,11 +133,11 @@ public class BptBuilderBlueprint extends BptBuilderBase {
}
}
Collections.sort(tmpBuildCubeList);
Collections.sort(tmpBuildComplexList);
Collections.sort(tmpStandalone);
Collections.sort(tmpLastBlocks);
buildList.addAll(tmpBuildCubeList);
buildList.addAll(tmpBuildComplexList);
buildList.addAll(tmpStandalone);
buildList.addAll(tmpLastBlocks);
iterator = new BuildingSlotIterator(buildList);

View file

@ -131,4 +131,9 @@ public class SchematicPipe extends SchematicTile {
BptPipeExtension.get(pipeItem).postProcessing(this, context);
}
}
@Override
public boolean isStandalone () {
return true;
}
}