From c657fee0a108703f6720a2d954009d0a8cbbfbee Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Wed, 30 Apr 2014 20:36:29 +0200 Subject: [PATCH] added notion of standalone block in schematic, fix #1650 --- .../core/blueprints/BptBuilderBlueprint.java | 18 +++++++++--------- .../transport/blueprints/SchematicPipe.java | 5 +++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index 823d28e4..67afcf8e 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -93,8 +93,8 @@ public class BptBuilderBlueprint extends BptBuilderBase { } } - LinkedList tmpBuildCubeList = new LinkedList(); - LinkedList tmpBuildComplexList = new LinkedList(); + LinkedList tmpStandalone = new LinkedList(); + LinkedList tmpLastBlocks = new LinkedList(); 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); diff --git a/common/buildcraft/transport/blueprints/SchematicPipe.java b/common/buildcraft/transport/blueprints/SchematicPipe.java index 25474d1f..9cacf1ae 100644 --- a/common/buildcraft/transport/blueprints/SchematicPipe.java +++ b/common/buildcraft/transport/blueprints/SchematicPipe.java @@ -131,4 +131,9 @@ public class SchematicPipe extends SchematicTile { BptPipeExtension.get(pipeItem).postProcessing(this, context); } } + + @Override + public boolean isStandalone () { + return true; + } }