|
7 | 7 | import com.simibubi.create.foundation.ponder.element.EntityElement; |
8 | 8 | import com.simibubi.create.foundation.ponder.element.InputWindowElement; |
9 | 9 | import com.simibubi.create.foundation.ponder.element.WorldSectionElement; |
| 10 | +import com.simibubi.create.foundation.ponder.instruction.DisplayWorldSectionInstruction; |
10 | 11 | import com.simibubi.create.foundation.utility.Pointing; |
11 | 12 | import net.minecraft.core.BlockPos; |
12 | 13 | import net.minecraft.core.Direction; |
|
18 | 19 | import net.minecraft.world.phys.AABB; |
19 | 20 | import net.minecraft.world.phys.Vec3; |
20 | 21 |
|
| 22 | +import java.util.Optional; |
| 23 | + |
21 | 24 | public class PatternSchematicPonderScenes { |
22 | 25 |
|
23 | 26 | public static void schematicPrinting(SceneBuilder scene, SceneBuildingUtil util) { |
@@ -163,13 +166,6 @@ public static void trainSchematicPrinting(SceneBuilder scene, SceneBuildingUtil |
163 | 166 | scene.world.showSection(util.select.layer(0), Direction.UP); |
164 | 167 | scene.idle(20); |
165 | 168 |
|
166 | | - //Remove the flowerbed so it can be replaced later# |
167 | | - Selection flowerBed = util.select.fromTo(1, 1, 2, 10, 2, 4); |
168 | | - scene.world.replaceBlocks( |
169 | | - flowerBed, Blocks.AIR.defaultBlockState(), false |
170 | | - ); |
171 | | - scene.world.showSection(flowerBed, Direction.DOWN); |
172 | | - |
173 | 169 | //Fill in train tracks |
174 | 170 | BlockPos |
175 | 171 | sectionFrom = new BlockPos(11, 1, 6), |
@@ -224,7 +220,11 @@ public static void trainSchematicPrinting(SceneBuilder scene, SceneBuildingUtil |
224 | 220 | scene.world.moveDeployer(util.grid.at(10, 3, z), 1, 4); |
225 | 221 | } |
226 | 222 | scene.idle(4); |
227 | | - scene.world.restoreBlocks(util.select.fromTo(x, 1, 2, x, 2, 4)); |
| 223 | + scene.addInstruction(new DisplayWorldSectionInstruction( |
| 224 | + 0, Direction.DOWN, |
| 225 | + util.select.fromTo(x, 1, 2, x, 2, 4), |
| 226 | + Optional.empty() |
| 227 | + )); |
228 | 228 | scene.idle(1); |
229 | 229 | for (int z = 2; z <= 4; z++) { |
230 | 230 | scene.world.moveDeployer(util.grid.at(10, 3, z), -1, 4); |
@@ -254,7 +254,11 @@ public static void trainSchematicPrinting(SceneBuilder scene, SceneBuildingUtil |
254 | 254 | scene.world.moveDeployer(util.grid.at(10, 3, z), 1, 4); |
255 | 255 | } |
256 | 256 | scene.idle(4); |
257 | | - scene.world.restoreBlocks(util.select.fromTo(x, 1, 2, x, 2, 4)); |
| 257 | + scene.addInstruction(new DisplayWorldSectionInstruction( |
| 258 | + 0, Direction.DOWN, |
| 259 | + util.select.fromTo(x, 1, 2, x, 2, 4), |
| 260 | + Optional.empty() |
| 261 | + )); |
258 | 262 | scene.idle(1); |
259 | 263 | for (int z = 2; z <= 4; z++) { |
260 | 264 | scene.world.moveDeployer(util.grid.at(10, 3, z), -1, 4); |
|
0 commit comments