use of com.simibubi.create.foundation.ponder.SceneBuilder in project Create by Creators-of-Create.
the class ProcessingScenes method basin.
public static void basin(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("basin", "Processing Items in the Basin");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.position(1, 1, 2), Direction.DOWN);
scene.idle(10);
BlockPos basinPos = util.grid.at(1, 2, 2);
scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.DOWN), false);
scene.world.showSection(util.select.position(basinPos), Direction.DOWN);
scene.idle(10);
Vec3 basinSide = util.vector.blockSurface(basinPos, Direction.WEST);
scene.overlay.showText(80).attachKeyFrame().text("A Basin can hold Items and Fluids for Processing").pointAt(basinSide).placeNearTarget();
scene.idle(10);
ItemStack stack = new ItemStack(Items.BRICK);
for (int i = 0; i < 4; i++) {
scene.world.createItemEntity(util.vector.centerOf(basinPos.above(3)), util.vector.of(0, 0, 0), stack);
scene.idle(10);
}
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.DOWN).withItem(stack), 30);
scene.idle(30);
for (Direction d : Iterate.horizontalDirections) {
scene.overlay.showOutline(PonderPalette.GREEN, new Object(), util.select.position(basinPos.below().relative(d)), 60);
scene.idle(4);
}
scene.overlay.showText(80).attachKeyFrame().colored(PonderPalette.GREEN).text("After a processing step, basins try to output below to the side of them").pointAt(basinSide).placeNearTarget();
scene.idle(90);
ElementLink<WorldSectionElement> depot = scene.world.showIndependentSection(util.select.position(3, 1, 1), Direction.EAST);
scene.world.moveSection(depot, util.vector.of(-2, 0, 0), 0);
scene.idle(10);
scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.NORTH), false);
scene.idle(10);
scene.overlay.showText(80).attachKeyFrame().colored(PonderPalette.GREEN).text("When a valid component is present, the Basin will show an output faucet").pointAt(basinSide.add(0.15, 0, -0.5)).placeNearTarget();
scene.idle(90);
scene.world.hideIndependentSection(depot, Direction.EAST);
scene.idle(15);
depot = scene.world.showIndependentSection(util.select.position(0, 1, 1), Direction.EAST);
scene.world.moveSection(depot, util.vector.of(1, 0, 0), 0);
scene.idle(20);
scene.world.hideIndependentSection(depot, Direction.EAST);
scene.overlay.showText(80).text("A number of options are applicable here").pointAt(util.vector.centerOf(util.grid.at(1, 1, 1))).placeNearTarget();
scene.idle(15);
depot = scene.world.showIndependentSection(util.select.position(1, 1, 0), Direction.EAST);
scene.world.moveSection(depot, util.vector.of(0, 0, 1), 0);
scene.idle(20);
scene.world.hideIndependentSection(depot, Direction.EAST);
scene.idle(15);
depot = scene.world.showIndependentSection(util.select.position(1, 1, 1), Direction.EAST);
scene.idle(20);
scene.world.hideIndependentSection(depot, Direction.EAST);
scene.idle(15);
depot = scene.world.showIndependentSection(util.select.fromTo(3, 1, 0, 2, 1, 0), Direction.EAST);
scene.world.moveSection(depot, util.vector.of(-2, 0, 1), 0);
scene.idle(20);
scene.world.hideIndependentSection(depot, Direction.EAST);
scene.idle(15);
depot = scene.world.showIndependentSection(util.select.position(2, 1, 1), Direction.EAST);
scene.world.moveSection(depot, util.vector.of(-1, 0, 0), 0);
scene.idle(25);
BlockPos pressPos = util.grid.at(1, 4, 2);
scene.world.showSection(util.select.position(pressPos), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.fromTo(1, 4, 3, 1, 1, 5), Direction.NORTH);
scene.idle(10);
Class<MechanicalPressTileEntity> type = MechanicalPressTileEntity.class;
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), stack));
scene.world.modifyTileNBT(util.select.position(basinPos), BasinTileEntity.class, nbt -> {
nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, new ItemStack(Blocks.BRICKS))), ia -> ia.getValue().serializeNBT()));
});
scene.idle(4);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos.below().north()), Pointing.RIGHT).withItem(new ItemStack(Items.BRICKS)), 30);
scene.overlay.showText(60).attachKeyFrame().colored(PonderPalette.GREEN).text("Outputs will be caught by the inventory below").pointAt(basinSide.add(0, -1, -1)).placeNearTarget();
scene.idle(70);
scene.world.hideIndependentSection(depot, Direction.NORTH);
scene.idle(10);
scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.DOWN), false);
scene.idle(20);
scene.overlay.showText(80).attachKeyFrame().text("Without output faucet, the Basin will retain items created in its processing").pointAt(basinSide).placeNearTarget();
scene.idle(50);
ItemStack nugget = AllItems.COPPER_NUGGET.asStack();
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(nugget), 30);
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), nugget));
ItemStack ingot = new ItemStack(Items.COPPER_INGOT);
scene.idle(30);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(ingot), 30);
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), ingot));
ItemStack block = new ItemStack(Items.COPPER_BLOCK);
scene.idle(30);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(block), 30);
scene.overlay.showText(70).attachKeyFrame().colored(PonderPalette.GREEN).text("This can be useful if outputs should be re-used as ingredients").pointAt(basinSide).placeNearTarget();
scene.idle(80);
scene.world.showSection(util.select.fromTo(2, 2, 5, 4, 1, 2), Direction.DOWN);
scene.rotateCameraY(70);
scene.world.createItemOnBelt(util.grid.at(2, 1, 2), Direction.WEST, block);
scene.idle(40);
scene.overlay.showText(70).text("Desired outputs will then have to be extracted from the basin").pointAt(util.vector.topOf(util.grid.at(3, 1, 2)).subtract(0, 3 / 16f, 0)).placeNearTarget();
scene.idle(80);
Vec3 filter = util.vector.of(2.5, 2.85, 2.5);
scene.overlay.showFilterSlotInput(filter, 80);
scene.overlay.showText(70).text("A Filter might be necessary to avoid pulling out un-processed items").pointAt(filter).placeNearTarget();
scene.idle(40);
scene.markAsFinished();
}
use of com.simibubi.create.foundation.ponder.SceneBuilder in project Create by Creators-of-Create.
the class FluidMovementActorScenes method transfer.
public static void transfer(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("portable_fluid_interface", "Contraption Fluid Exchange");
scene.configureBasePlate(0, 0, 6);
scene.scaleSceneView(0.95f);
scene.setSceneOffsetY(-1);
scene.showBasePlate();
scene.idle(5);
Selection pipes = util.select.fromTo(2, 1, 3, 0, 1, 3).add(util.select.position(0, 1, 4));
BlockPos pumpPos = util.grid.at(0, 1, 4);
Selection kinetics = util.select.fromTo(1, 1, 7, 1, 1, 4);
Selection tank = util.select.fromTo(0, 1, 5, 0, 3, 5);
Selection largeCog = util.select.position(2, 0, 7);
FluidStack chocolate = new FluidStack(FluidHelper.convertToStill(AllFluids.CHOCOLATE.get()), 1000);
BlockPos ct1 = util.grid.at(5, 3, 2);
BlockPos ct2 = util.grid.at(6, 3, 2);
BlockPos st = util.grid.at(0, 1, 5);
Capability<IFluidHandler> fhc = CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY;
Class<FluidTankTileEntity> type = FluidTankTileEntity.class;
ItemStack bucket = AllFluids.CHOCOLATE.get().getAttributes().getBucket(chocolate);
scene.world.modifyTileEntity(st, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.fill(FluidHelper.copyStackWithAmount(chocolate, 10000), FluidAction.EXECUTE)));
BlockPos bearing = util.grid.at(5, 1, 2);
scene.world.showSection(util.select.position(bearing), Direction.DOWN);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.fromTo(5, 2, 2, 6, 4, 2), Direction.DOWN);
scene.world.configureCenterOfRotation(contraption, util.vector.centerOf(bearing));
scene.idle(10);
scene.world.rotateBearing(bearing, 360, 70);
scene.world.rotateSection(contraption, 0, 360, 0, 70);
scene.overlay.showText(60).pointAt(util.vector.topOf(bearing.above(2))).colored(PonderPalette.RED).placeNearTarget().attachKeyFrame().text("Fluid Tanks on moving contraptions cannot be accessed by any pipes");
scene.idle(70);
BlockPos psi = util.grid.at(4, 2, 2);
scene.world.showSectionAndMerge(util.select.position(psi), Direction.EAST, contraption);
scene.idle(13);
scene.effects.superGlue(psi, Direction.EAST, true);
scene.overlay.showText(80).pointAt(util.vector.topOf(psi)).colored(PonderPalette.GREEN).placeNearTarget().attachKeyFrame().text("This component can interact with fluid tanks without the need to stop the contraption");
scene.idle(90);
BlockPos psi2 = psi.west(2);
scene.world.showSection(util.select.position(psi2), Direction.DOWN);
scene.overlay.showSelectionWithText(util.select.position(psi.west()), 50).colored(PonderPalette.RED).placeNearTarget().attachKeyFrame().text("Place a second one with a gap of 1 or 2 blocks inbetween");
scene.idle(55);
scene.world.rotateBearing(bearing, 360, 60);
scene.world.rotateSection(contraption, 0, 360, 0, 60);
scene.idle(20);
scene.overlay.showText(40).placeNearTarget().pointAt(util.vector.of(3, 3, 2.5)).text("Whenever they pass by each other, they will engage in a connection");
scene.idle(35);
Selection both = util.select.fromTo(2, 2, 2, 4, 2, 2);
Class<PortableFluidInterfaceTileEntity> psiClass = PortableFluidInterfaceTileEntity.class;
scene.world.modifyTileNBT(both, psiClass, nbt -> {
nbt.putFloat("Distance", 1);
nbt.putFloat("Timer", 40);
});
scene.idle(20);
scene.overlay.showOutline(PonderPalette.GREEN, psi, util.select.fromTo(5, 3, 2, 6, 4, 2), 80);
scene.idle(10);
scene.overlay.showSelectionWithText(util.select.position(psi2), 70).placeNearTarget().colored(PonderPalette.GREEN).attachKeyFrame().text("While engaged, the stationary interface will represent ALL Tanks on the contraption");
scene.idle(80);
ElementLink<WorldSectionElement> p = scene.world.showIndependentSection(tank, Direction.DOWN);
scene.world.moveSection(p, util.vector.of(0, 0, -1), 0);
scene.idle(5);
scene.world.showSectionAndMerge(pipes, Direction.EAST, p);
scene.idle(5);
scene.world.showSectionAndMerge(largeCog, Direction.UP, p);
scene.world.showSectionAndMerge(kinetics, Direction.NORTH, p);
scene.idle(10);
scene.overlay.showText(70).placeNearTarget().pointAt(util.vector.topOf(pumpPos)).attachKeyFrame().text("Fluid can now be inserted...");
scene.idle(30);
for (int i = 0; i < 16; i++) {
if (i == 8)
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(5, 3, 2), Direction.WEST).add(0, 0.5, 0), Pointing.LEFT).withItem(bucket), 30);
scene.world.modifyTileEntity(st, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE)));
scene.world.modifyTileEntity(ct1, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.fill(chocolate, FluidAction.EXECUTE)));
scene.idle(2);
}
for (int i = 0; i < 8; i++) {
scene.world.modifyTileEntity(st, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE)));
scene.world.modifyTileEntity(ct2, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.fill(chocolate, FluidAction.EXECUTE)));
scene.idle(2);
}
scene.idle(50);
scene.overlay.showText(40).placeNearTarget().pointAt(util.vector.topOf(pumpPos)).text("...or extracted from the contraption");
scene.world.multiplyKineticSpeed(util.select.everywhere(), -1);
scene.world.propagatePipeChange(pumpPos);
scene.idle(30);
for (int i = 0; i < 8; i++) {
scene.world.modifyTileEntity(ct2, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE)));
scene.world.modifyTileEntity(st, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.fill(chocolate, FluidAction.EXECUTE)));
scene.idle(2);
}
for (int i = 0; i < 16; i++) {
scene.world.modifyTileEntity(ct1, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE)));
scene.world.modifyTileEntity(st, type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.fill(chocolate, FluidAction.EXECUTE)));
scene.idle(2);
}
scene.world.modifyTileEntity(util.grid.at(2, 2, 3), type, te -> te.getCapability(fhc).ifPresent(ifh -> ifh.drain(8000, FluidAction.EXECUTE)));
scene.idle(50);
scene.overlay.showText(120).placeNearTarget().attachKeyFrame().pointAt(util.vector.topOf(psi2)).text("After no contents have been exchanged for a while, the contraption will continue on its way");
scene.world.modifyTileNBT(both, psiClass, nbt -> nbt.putFloat("Timer", 9));
scene.idle(15);
scene.markAsFinished();
scene.world.rotateBearing(bearing, 270, 120);
scene.world.rotateSection(contraption, 0, 270, 0, 120);
}
use of com.simibubi.create.foundation.ponder.SceneBuilder in project Create by Creators-of-Create.
the class HosePulleyScenes method level.
public static void level(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("hose_pulley_level", "Fill and Drain level of Hose Pulleys");
scene.configureBasePlate(0, 0, 3);
scene.setSceneOffsetY(-1.5f);
scene.scaleSceneView(.9f);
scene.showBasePlate();
List<BlockPos> blocks = new LinkedList<>();
for (int y = 1; y < 4; y++) {
blocks.add(util.grid.at(1, y, 1));
blocks.add(util.grid.at(0, y, 1));
blocks.add(util.grid.at(1, y, 0));
blocks.add(util.grid.at(2, y, 1));
blocks.add(util.grid.at(1, y, 2));
blocks.add(util.grid.at(0, y, 0));
blocks.add(util.grid.at(2, y, 0));
blocks.add(util.grid.at(2, y, 2));
blocks.add(util.grid.at(0, y, 2));
}
for (BlockPos blockPos : blocks) scene.world.setBlock(blockPos, Blocks.WATER.defaultBlockState(), false);
scene.idle(5);
Selection water = util.select.fromTo(2, 1, 0, 0, 4, 2);
scene.world.showSection(water, Direction.UP);
scene.idle(10);
Selection cogs = util.select.fromTo(3, 1, 2, 3, 2, 2);
Selection pipes = util.select.fromTo(3, 1, 1, 3, 6, 1).add(util.select.position(2, 6, 1));
BlockPos hosePos = util.grid.at(1, 6, 1);
Selection hose = util.select.position(1, 6, 1);
Selection crank = util.select.position(0, 6, 1);
ElementLink<WorldSectionElement> hoselink = scene.world.showIndependentSection(hose, Direction.DOWN);
scene.world.moveSection(hoselink, util.vector.of(0, -1, 0), 0);
scene.idle(10);
scene.world.showSectionAndMerge(crank, Direction.EAST, hoselink);
scene.idle(20);
scene.overlay.showSelectionWithText(util.select.position(hosePos.below()), 50).text("While fully retracted, the Hose Pulley cannot operate").placeNearTarget().colored(PonderPalette.RED).attachKeyFrame().pointAt(util.vector.blockSurface(hosePos.below(), Direction.UP));
scene.idle(55);
Selection kinetics = util.select.fromTo(1, 6, 1, 0, 6, 1);
scene.world.setKineticSpeed(kinetics, 32);
scene.idle(50);
scene.world.setKineticSpeed(kinetics, 0);
scene.overlay.showText(40).text("Draining runs from top to bottom").attachKeyFrame().placeNearTarget().pointAt(util.vector.centerOf(hosePos.below(3)));
scene.idle(10);
scene.world.showSectionAndMerge(cogs, Direction.NORTH, hoselink);
scene.world.showSectionAndMerge(pipes, Direction.WEST, hoselink);
scene.world.multiplyKineticSpeed(util.select.fromTo(3, 1, 2, 3, 2, 1), -1);
scene.world.modifyTileEntity(util.grid.at(1, 6, 1), HosePulleyTileEntity.class, te -> te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).ifPresent(ifh -> ((HosePulleyFluidHandler) ifh).fill(new FluidStack(Fluids.WATER, 100), FluidAction.EXECUTE)));
scene.world.propagatePipeChange(util.grid.at(3, 2, 1));
Vec3 surface = util.vector.topOf(1, 3, 1).subtract(0, 2 / 8f, 0);
AABB bb = new AABB(surface, surface).inflate(1.5, 0, 1.5);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.MEDIUM, bb, bb, 3);
scene.idle(3);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.MEDIUM, bb, bb.expandTowards(0, -2, 0), 70);
scene.idle(20);
Collections.reverse(blocks);
int i = 0;
for (BlockPos blockPos : blocks) {
if (i++ == 18)
break;
scene.world.destroyBlock(blockPos);
scene.idle(3);
}
scene.overlay.chaseBoundingBoxOutline(PonderPalette.WHITE, bb, bb.move(0, -2, 0), 60);
scene.overlay.showText(60).text("The surface level will end up just below where the hose ends").attachKeyFrame().placeNearTarget().pointAt(util.vector.of(0, 2 - 1 / 8f, 1.5f));
scene.idle(30);
scene.idle(10);
scene.world.multiplyKineticSpeed(util.select.fromTo(3, 1, 2, 3, 2, 1), -1);
scene.world.propagatePipeChange(util.grid.at(3, 2, 1));
scene.idle(30);
scene.world.hideSection(water, Direction.SOUTH);
scene.idle(15);
for (BlockPos blockPos : blocks) scene.world.destroyBlock(blockPos);
scene.world.showSection(water, Direction.UP);
scene.idle(15);
scene.world.setKineticSpeed(kinetics, -32);
scene.idle(16);
scene.world.setKineticSpeed(kinetics, 0);
scene.overlay.showText(40).text("Filling runs from bottom to top").attachKeyFrame().placeNearTarget().pointAt(util.vector.centerOf(hosePos.below(3)));
scene.idle(10);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.MEDIUM, bb, bb.move(0, -3 + 2 / 8f, 0), 3);
scene.idle(3);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.MEDIUM, bb, bb.expandTowards(0, -3 + 2 / 8f, 0), 120);
scene.idle(20);
scene.world.setBlock(util.grid.at(1, 3, 1), Blocks.WATER.defaultBlockState(), false);
scene.idle(3);
scene.world.setBlock(util.grid.at(1, 2, 1), Blocks.WATER.defaultBlockState(), false);
scene.idle(3);
Collections.reverse(blocks);
for (BlockPos blockPos : blocks) {
scene.world.setBlock(blockPos, Blocks.WATER.defaultBlockState(), false);
scene.idle(3);
}
scene.overlay.chaseBoundingBoxOutline(PonderPalette.WHITE, bb, bb, 100);
scene.overlay.showText(100).text("The filled pool will not grow beyond the layer above the hose end").attachKeyFrame().placeNearTarget().pointAt(util.vector.of(0, 4 - 1 / 8f, 1.5f));
scene.idle(80);
}
use of com.simibubi.create.foundation.ponder.SceneBuilder in project Create by Creators-of-Create.
the class PipeScenes method smart.
public static void smart(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("smart_pipe", "Controlling Fluid flow using Smart Pipes");
scene.configureBasePlate(1, 0, 5);
scene.showBasePlate();
scene.idle(5);
Selection tank1 = util.select.fromTo(4, 1, 3, 4, 2, 3);
Selection tank2 = util.select.fromTo(4, 1, 4, 4, 2, 4);
Selection additionalPipes = util.select.fromTo(3, 1, 4, 1, 1, 4);
Selection mainPipes = util.select.fromTo(3, 1, 3, 1, 1, 1);
Selection kinetics1 = util.select.fromTo(0, 0, 2, 0, 0, 5);
Selection kinetics2 = util.select.position(1, 0, 5);
BlockPos basinPos = util.grid.at(4, 1, 1);
BlockPos pumpPos = util.grid.at(1, 1, 2);
Selection pump = util.select.position(1, 1, 2);
Selection basin = util.select.position(basinPos);
BlockPos smartPos = util.grid.at(3, 1, 1);
scene.world.modifyTileEntity(basinPos, BasinTileEntity.class, te -> te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).ifPresent(ifh -> ifh.fill(new FluidStack(ForgeMod.MILK.get(), 1000), FluidAction.EXECUTE)));
scene.world.setBlock(util.grid.at(3, 1, 3), AllBlocks.FLUID_PIPE.get().getAxisState(Axis.X), false);
scene.world.setBlock(smartPos, AllBlocks.FLUID_PIPE.get().getAxisState(Axis.X), false);
scene.world.setBlock(util.grid.at(2, 1, 3), AllBlocks.GLASS_FLUID_PIPE.getDefaultState().setValue(GlassFluidPipeBlock.AXIS, Axis.X), false);
scene.world.setBlock(util.grid.at(1, 1, 3), AllBlocks.FLUID_PIPE.get().getAxisState(Axis.X).setValue(FluidPipeBlock.NORTH, true).setValue(FluidPipeBlock.WEST, false), false);
scene.world.showSection(basin, Direction.DOWN);
scene.idle(5);
scene.world.showSection(tank1, Direction.DOWN);
scene.idle(5);
scene.world.showSection(mainPipes, Direction.EAST);
scene.idle(15);
scene.world.destroyBlock(smartPos);
scene.world.restoreBlocks(util.select.position(smartPos));
Vec3 filterVec = util.vector.topOf(smartPos).subtract(0.25, 0, 0);
scene.overlay.showText(50).placeNearTarget().text("Smart pipes can help control flows by fluid type").attachKeyFrame().pointAt(filterVec);
scene.idle(60);
scene.overlay.showSelectionWithText(util.select.position(basinPos), 80).placeNearTarget().colored(PonderPalette.GREEN).text("When placed directly at the source, they can specify the type of fluid to extract").attachKeyFrame().pointAt(filterVec);
scene.idle(90);
FluidStack chocolate = new FluidStack(FluidHelper.convertToStill(AllFluids.CHOCOLATE.get()), 1000);
ItemStack bucket = AllFluids.CHOCOLATE.get().getAttributes().getBucket(chocolate);
ItemStack milkBucket = new ItemStack(Items.MILK_BUCKET);
scene.overlay.showControls(new InputWindowElement(filterVec, Pointing.DOWN).rightClick().withItem(bucket), 80);
scene.idle(7);
scene.world.setFilterData(util.select.position(3, 1, 1), SmartFluidPipeTileEntity.class, bucket);
scene.idle(10);
scene.overlay.showText(60).placeNearTarget().attachKeyFrame().text("Simply Right-Click their filter slot with any item containing the desired fluid").pointAt(filterVec);
scene.idle(50);
scene.world.showSection(kinetics2, Direction.WEST);
scene.world.setKineticSpeed(kinetics2, 64);
scene.idle(5);
scene.world.showSection(kinetics1, Direction.EAST);
scene.world.setKineticSpeed(kinetics1, -64);
scene.idle(10);
scene.world.setKineticSpeed(pump, 128);
scene.world.propagatePipeChange(pumpPos);
scene.idle(120);
scene.world.setKineticSpeed(util.select.everywhere(), 0);
scene.world.propagatePipeChange(pumpPos);
scene.effects.rotationSpeedIndicator(pumpPos);
scene.idle(15);
scene.world.showSection(tank2, Direction.DOWN);
scene.world.showSection(additionalPipes, Direction.NORTH);
scene.world.setBlock(util.grid.at(3, 1, 1), AllBlocks.FLUID_PIPE.get().getAxisState(Axis.X), true);
scene.idle(10);
for (int i = 0; i < 3; i++) {
BlockPos pos = util.grid.at(1 + i, 1, 3);
scene.world.destroyBlock(pos);
scene.world.restoreBlocks(util.select.position(pos));
scene.idle(2);
}
scene.idle(15);
scene.world.modifyTileEntity(basinPos, BasinTileEntity.class, te -> te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).ifPresent(ifh -> ifh.fill(chocolate, FluidAction.EXECUTE)));
scene.idle(10);
scene.overlay.showText(80).placeNearTarget().colored(PonderPalette.GREEN).text("When placed further down a pipe network, smart pipes will only let matching fluids continue").attachKeyFrame().pointAt(filterVec.add(-1, 0, 2));
scene.idle(90);
scene.overlay.showControls(new InputWindowElement(filterVec.add(-1, 0, 3), Pointing.DOWN).rightClick().withItem(milkBucket), 30);
scene.idle(7);
scene.world.setFilterData(util.select.position(2, 1, 4), SmartFluidPipeTileEntity.class, milkBucket);
scene.idle(30);
scene.overlay.showControls(new InputWindowElement(filterVec.add(-1, 0, 2), Pointing.DOWN).rightClick().withItem(bucket), 30);
scene.idle(7);
scene.world.setFilterData(util.select.position(2, 1, 3), SmartFluidPipeTileEntity.class, bucket);
scene.idle(30);
scene.world.setKineticSpeed(kinetics2, 64);
scene.world.setKineticSpeed(kinetics1, -64);
scene.world.setKineticSpeed(pump, 128);
scene.world.propagatePipeChange(pumpPos);
scene.effects.rotationSpeedIndicator(pumpPos);
scene.idle(40);
}
use of com.simibubi.create.foundation.ponder.SceneBuilder in project FrostedHeart by TeamMoegMC.
the class MixinProcessingScenes method pressing.
/**
* @author khjxiaogu
* @reason change mechanical press scene to fit TWR
*/
@Overwrite(remap = false)
public static void pressing(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_press", "Processing Items with the Mechanical Press");
scene.configureBasePlate(0, 0, 5);
scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.ANDESITE_CASING.getDefaultState(), false);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.fromTo(1, 4, 3, 1, 1, 5), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(1, 1, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(1, 2, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(1, 4, 2), Direction.SOUTH);
scene.idle(5);
scene.world.showSection(util.select.fromTo(3, 1, 1, 1, 1, 1), Direction.SOUTH);
scene.world.showSection(util.select.fromTo(3, 1, 5, 3, 1, 2), Direction.SOUTH);
scene.idle(20);
BlockPos basin = util.grid.at(1, 2, 2);
BlockPos pressPos = util.grid.at(1, 4, 2);
Vector3d basinSide = util.vector.blockSurface(basin, Direction.WEST);
ItemStack copper = AllItems.COPPER_INGOT.asStack();
ItemStack copperBlock = AllItems.COPPER_SHEET.asStack();
scene.overlay.showText(60).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Pressing items held in a Basin will cause them to be Compacted");
scene.idle(40);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.DOWN).withItem(copper), 30);
scene.idle(30);
Class<MechanicalPressTileEntity> type = MechanicalPressTileEntity.class;
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basin), copper));
scene.world.modifyTileNBT(util.select.position(basin), BasinTileEntity.class, nbt -> {
nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, copperBlock)), ia -> ia.getValue().serializeNBT()));
});
scene.idle(4);
scene.world.createItemOnBelt(util.grid.at(1, 1, 1), Direction.UP, copperBlock);
scene.idle(30);
scene.overlay.showText(80).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Compacting includes any filled 2x2 or 3x3 Crafting Recipe, plus a couple extra ones");
scene.idle(30);
ItemStack log = new ItemStack(Items.OAK_LOG);
ItemStack bark = new ItemStack(Items.OAK_WOOD);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.DOWN).withItem(log), 30);
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basin), log));
scene.world.modifyTileNBT(util.select.position(basin), BasinTileEntity.class, nbt -> {
nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, bark)), ia -> ia.getValue().serializeNBT()));
});
scene.idle(4);
scene.world.createItemOnBelt(util.grid.at(1, 1, 1), Direction.UP, bark);
scene.idle(30);
scene.rotateCameraY(-30);
scene.idle(10);
scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.BLAZE_BURNER.getDefaultState().with(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), true);
scene.idle(10);
scene.overlay.showText(80).pointAt(basinSide.subtract(0, 1, 0)).placeNearTarget().text("Some of those recipes may require the heat of a Blaze Burner");
scene.idle(40);
scene.rotateCameraY(30);
scene.idle(60);
Vector3d filterPos = util.vector.of(1, 2.75f, 2.5f);
scene.overlay.showFilterSlotInput(filterPos, 100);
scene.overlay.showText(120).pointAt(filterPos).placeNearTarget().attachKeyFrame().text("The filter slot can be used in case two recipes are conflicting.");
scene.idle(60);
}
Aggregations