use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class PistonScenes method movementModes.
public static void movementModes(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_piston_modes", "Movement Modes of the Mechanical Piston");
scene.configureBasePlate(0, 0, 5);
Selection rose = util.select.fromTo(0, 2, 2, 0, 1, 2);
scene.world.showSection(util.select.layer(0).add(rose), Direction.UP);
Selection kinetics = util.select.fromTo(3, 1, 3, 3, 1, 2);
BlockPos piston = util.grid.at(3, 1, 2);
BlockPos leverPos = util.grid.at(3, 2, 4);
BlockPos shaft = util.grid.at(3, 1, 3);
scene.idle(5);
scene.world.showSection(util.select.fromTo(3, 1, 3, 3, 2, 5), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(piston), Direction.DOWN);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.position(3, 1, 1), Direction.DOWN);
scene.world.moveSection(contraption, util.vector.of(0, 0, 1), 0);
scene.idle(20);
scene.world.showSectionAndMerge(util.select.position(piston.north().east()), Direction.DOWN, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(piston.north().east(2)), Direction.DOWN, contraption);
scene.world.showSectionAndMerge(util.select.position(piston.north().west()), Direction.DOWN, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(piston.north().west().above()), Direction.DOWN, contraption);
scene.idle(15);
scene.effects.superGlue(piston.west(), Direction.UP, true);
scene.idle(10);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.modifyKineticSpeed(kinetics, f -> -f);
scene.effects.rotationDirectionIndicator(shaft);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 40);
scene.idle(40);
scene.world.destroyBlock(util.grid.at(0, 1, 2));
scene.world.destroyBlock(util.grid.at(0, 2, 2));
scene.idle(10);
scene.overlay.showSelectionWithText(rose, 70).text("Whenever Pistons stop moving, the moved structure reverts to blocks").attachKeyFrame().colored(PonderPalette.RED);
scene.idle(80);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.modifyKineticSpeed(kinetics, f -> -f);
scene.effects.rotationDirectionIndicator(shaft);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.world.hideSection(rose, Direction.UP);
scene.idle(50);
scene.world.setBlock(util.grid.at(0, 1, 2), Blocks.ROSE_BUSH.defaultBlockState(), false);
scene.world.setBlock(util.grid.at(0, 2, 2), Blocks.ROSE_BUSH.defaultBlockState().setValue(DoublePlantBlock.HALF, DoubleBlockHalf.UPPER), false);
scene.world.showIndependentSection(rose, Direction.DOWN);
scene.overlay.showCenteredScrollInput(piston, Direction.UP, 60);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(piston), Pointing.DOWN).scroll().withWrench(), 60);
scene.overlay.showText(70).pointAt(util.vector.topOf(piston)).placeNearTarget().attachKeyFrame().sharedText("behaviour_modify_wrench");
scene.idle(80);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.modifyKineticSpeed(kinetics, f -> -f);
scene.effects.rotationDirectionIndicator(shaft);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 40);
scene.idle(50);
scene.overlay.showText(120).colored(PonderPalette.GREEN).pointAt(util.vector.blockSurface(util.grid.at(0, 1, 2), Direction.WEST)).placeNearTarget().text("It can be configured never to revert to solid blocks, or only at the location it started at");
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class PistonScenes method poles.
public static void poles(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("piston_pole", "Piston Extension Poles");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
Selection kinetics = util.select.fromTo(3, 1, 3, 3, 1, 2);
BlockPos piston = util.grid.at(3, 1, 2);
scene.idle(5);
scene.world.showSection(util.select.fromTo(3, 1, 3, 3, 2, 5), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(piston), Direction.DOWN);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.position(3, 1, 1), Direction.DOWN);
scene.world.moveSection(contraption, util.vector.of(0, 0, 1), 0);
scene.idle(20);
BlockPos leverPos = util.grid.at(3, 2, 4);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.setKineticSpeed(kinetics, 16);
scene.idle(10);
scene.overlay.showSelectionWithText(util.select.position(piston), 50).colored(PonderPalette.RED).placeNearTarget().attachKeyFrame().text("Without attached Poles, a Mechanical Piston cannot move");
scene.idle(60);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.setKineticSpeed(kinetics, 0);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(piston.north().east()), Direction.DOWN, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(piston.north().east(2)), Direction.DOWN, contraption);
scene.idle(10);
scene.overlay.showOutline(PonderPalette.RED, new Object(), util.select.fromTo(piston.east(), piston.east(2)), 100);
scene.overlay.showSelectionWithText(util.select.fromTo(piston.west(), piston.west(2)), 100).text("The Length of pole added at its back determines the Extension Range").attachKeyFrame().placeNearTarget().colored(PonderPalette.GREEN);
scene.idle(110);
scene.world.showSectionAndMerge(util.select.position(piston.north().west()), Direction.EAST, contraption);
scene.idle(10);
ElementLink<ParrotElement> birb = scene.special.createBirb(util.vector.topOf(piston.west()), FaceCursorPose::new);
scene.idle(15);
scene.effects.indicateRedstone(leverPos);
scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
scene.world.setKineticSpeed(kinetics, 16);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 40);
scene.special.moveParrot(birb, util.vector.of(-2, 0, 0), 40);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class ProcessingScenes method pressing.
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.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
ElementLink<WorldSectionElement> depot = scene.world.showIndependentSection(util.select.position(2, 1, 1), Direction.DOWN);
scene.world.moveSection(depot, util.vector.of(0, 0, 1), 0);
scene.idle(10);
Selection pressS = util.select.position(2, 3, 2);
BlockPos pressPos = util.grid.at(2, 3, 2);
BlockPos depotPos = util.grid.at(2, 1, 1);
scene.world.setKineticSpeed(pressS, 0);
scene.world.showSection(pressS, Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.fromTo(2, 1, 3, 2, 1, 5), Direction.NORTH);
scene.idle(3);
scene.world.showSection(util.select.position(2, 2, 3), Direction.SOUTH);
scene.idle(3);
scene.world.showSection(util.select.position(2, 3, 3), Direction.NORTH);
scene.world.setKineticSpeed(pressS, -32);
scene.effects.indicateSuccess(pressPos);
scene.idle(10);
Vec3 pressSide = util.vector.blockSurface(pressPos, Direction.WEST);
scene.overlay.showText(60).pointAt(pressSide).placeNearTarget().attachKeyFrame().text("The Mechanical Press can process items provided beneath it");
scene.idle(70);
scene.overlay.showText(60).pointAt(pressSide.subtract(0, 2, 0)).placeNearTarget().text("The Input items can be dropped or placed on a Depot under the Press");
scene.idle(50);
ItemStack copper = new ItemStack(Items.COPPER_INGOT);
scene.world.createItemOnBeltLike(depotPos, Direction.NORTH, copper);
Vec3 depotCenter = util.vector.centerOf(depotPos.south());
scene.overlay.showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(copper), 30);
scene.idle(10);
Class<MechanicalPressTileEntity> type = MechanicalPressTileEntity.class;
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BELT));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makePressingParticleEffect(depotCenter.add(0, 8 / 16f, 0), copper));
scene.world.removeItemsFromBelt(depotPos);
ItemStack sheet = AllItems.COPPER_SHEET.asStack();
scene.world.createItemOnBeltLike(depotPos, Direction.UP, sheet);
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(sheet), 50);
scene.idle(60);
scene.world.hideIndependentSection(depot, Direction.NORTH);
scene.idle(5);
scene.world.showSection(util.select.fromTo(0, 1, 3, 0, 2, 3), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.fromTo(4, 1, 2, 0, 2, 2), Direction.SOUTH);
scene.idle(20);
BlockPos beltPos = util.grid.at(0, 1, 2);
scene.overlay.showText(40).pointAt(util.vector.blockSurface(beltPos, Direction.WEST)).placeNearTarget().attachKeyFrame().text("When items are provided on a belt...");
scene.idle(30);
ElementLink<BeltItemElement> ingot = scene.world.createItemOnBelt(beltPos, Direction.SOUTH, copper);
scene.idle(15);
ElementLink<BeltItemElement> ingot2 = scene.world.createItemOnBelt(beltPos, Direction.SOUTH, copper);
scene.idle(15);
scene.world.stallBeltItem(ingot, true);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BELT));
scene.overlay.showText(50).pointAt(pressSide).placeNearTarget().attachKeyFrame().text("The Press will hold and process them automatically");
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makePressingParticleEffect(depotCenter.add(0, 8 / 16f, 0), copper));
scene.world.removeItemsFromBelt(pressPos.below(2));
ingot = scene.world.createItemOnBelt(pressPos.below(2), Direction.UP, sheet);
scene.world.stallBeltItem(ingot, true);
scene.idle(15);
scene.world.stallBeltItem(ingot, false);
scene.idle(15);
scene.world.stallBeltItem(ingot2, true);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BELT));
scene.idle(30);
scene.world.modifyTileEntity(pressPos, type, pte -> pte.makePressingParticleEffect(depotCenter.add(0, 8 / 16f, 0), copper));
scene.world.removeItemsFromBelt(pressPos.below(2));
ingot2 = scene.world.createItemOnBelt(pressPos.below(2), Direction.UP, sheet);
scene.world.stallBeltItem(ingot2, true);
scene.idle(15);
scene.world.stallBeltItem(ingot2, false);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class PulleyScenes method movementModes.
public static void movementModes(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("rope_pulley_modes", "Movement Modes of the Rope Pulley");
scene.configureBasePlate(0, 0, 5);
scene.scaleSceneView(0.95f);
scene.setSceneOffsetY(-1);
Selection reversable = util.select.fromTo(2, 3, 4, 2, 4, 2);
BlockPos leverPos = util.grid.at(1, 2, 4);
BlockPos pulleyPos = util.grid.at(2, 4, 2);
Selection redstoneStuff = util.select.fromTo(leverPos, leverPos.east());
BlockPos flowerPos = util.grid.at(2, 1, 2);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.world.showSection(util.select.position(flowerPos), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.fromTo(1, 4, 3, 2, 1, 4), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(pulleyPos), Direction.SOUTH);
ElementLink<WorldSectionElement> glass = scene.world.showIndependentSection(util.select.position(pulleyPos.below()), Direction.UP);
scene.idle(20);
scene.world.toggleRedstonePower(redstoneStuff);
scene.effects.indicateRedstone(leverPos);
scene.world.modifyKineticSpeed(reversable, f -> -f);
scene.effects.rotationDirectionIndicator(pulleyPos.south());
scene.world.movePulley(pulleyPos, 2, 40);
scene.world.moveSection(glass, util.vector.of(0, -2, 0), 40);
scene.idle(40);
scene.world.destroyBlock(flowerPos);
scene.idle(10);
scene.overlay.showSelectionWithText(util.select.position(flowerPos), 70).text("Whenever Pulleys stop moving, the moved structure reverts to blocks").attachKeyFrame().placeNearTarget().colored(PonderPalette.RED);
scene.idle(80);
scene.world.toggleRedstonePower(redstoneStuff);
scene.effects.indicateRedstone(leverPos);
scene.world.modifyKineticSpeed(reversable, f -> -f);
scene.effects.rotationDirectionIndicator(pulleyPos.south());
scene.world.movePulley(pulleyPos, -2, 40);
scene.world.moveSection(glass, util.vector.of(0, 2, 0), 40);
scene.world.hideSection(util.select.position(flowerPos), Direction.DOWN);
scene.idle(40);
scene.world.setBlock(flowerPos, Blocks.BLUE_ORCHID.defaultBlockState(), false);
scene.world.showSection(util.select.position(flowerPos), Direction.DOWN);
scene.overlay.showCenteredScrollInput(pulleyPos, Direction.UP, 60);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(pulleyPos), Pointing.DOWN).scroll().withWrench(), 60);
scene.overlay.showText(70).pointAt(util.vector.topOf(pulleyPos)).placeNearTarget().attachKeyFrame().sharedText("behaviour_modify_wrench");
scene.idle(80);
scene.world.toggleRedstonePower(redstoneStuff);
scene.effects.indicateRedstone(leverPos);
scene.world.modifyKineticSpeed(reversable, f -> -f);
scene.effects.rotationDirectionIndicator(pulleyPos.south());
scene.world.movePulley(pulleyPos, 2, 40);
scene.world.moveSection(glass, util.vector.of(0, -2, 0), 40);
scene.idle(50);
scene.overlay.showText(120).colored(PonderPalette.GREEN).pointAt(util.vector.blockSurface(flowerPos, Direction.WEST)).placeNearTarget().text("It can be configured never to revert to solid blocks, or only at the location it started at");
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class DeployerScenes method processing.
public static void processing(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("deployer_processing", "Processing Items using Deployers");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
ElementLink<WorldSectionElement> depot = scene.world.showIndependentSection(util.select.position(2, 1, 1), Direction.DOWN);
scene.world.moveSection(depot, util.vector.of(0, 0, 1), 0);
scene.idle(10);
Selection pressS = util.select.position(2, 3, 2);
BlockPos pressPos = util.grid.at(2, 3, 2);
BlockPos depotPos = util.grid.at(2, 1, 1);
scene.world.setKineticSpeed(pressS, 0);
scene.world.showSection(pressS, Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.fromTo(2, 1, 3, 2, 1, 5), Direction.NORTH);
scene.idle(3);
scene.world.showSection(util.select.position(2, 2, 3), Direction.SOUTH);
scene.idle(3);
scene.world.showSection(util.select.position(2, 3, 3), Direction.NORTH);
scene.world.setKineticSpeed(pressS, -32);
scene.effects.indicateSuccess(pressPos);
scene.idle(10);
ItemStack tool = AllItems.SAND_PAPER.asStack();
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(pressPos.below(), Direction.EAST).add(0, 0.15, 0), Pointing.RIGHT).withItem(tool), 30);
scene.idle(7);
scene.world.modifyTileNBT(pressS, DeployerTileEntity.class, nbt -> nbt.put("HeldItem", tool.serializeNBT()));
scene.idle(25);
Vec3 pressSide = util.vector.blockSurface(pressPos, Direction.WEST);
scene.overlay.showText(60).pointAt(pressSide).placeNearTarget().attachKeyFrame().text("With a fitting held item, Deployers can process items provided beneath them");
scene.idle(80);
scene.overlay.showText(60).pointAt(pressSide.subtract(0, 2, 0)).placeNearTarget().text("The Input items can be dropped or placed on a Depot under the Deployer");
scene.idle(50);
ItemStack quartz = AllItems.ROSE_QUARTZ.asStack();
scene.world.createItemOnBeltLike(depotPos, Direction.NORTH, quartz);
Vec3 depotCenter = util.vector.centerOf(depotPos.south());
scene.overlay.showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(quartz), 30);
scene.idle(10);
Vec3 targetV = util.vector.centerOf(pressPos).subtract(0, 1.65, 0);
scene.world.moveDeployer(pressPos, 1, 30);
scene.idle(30);
scene.world.moveDeployer(pressPos, -1, 30);
scene.debug.enqueueCallback(s -> SandPaperItem.spawnParticles(targetV, quartz, s.getWorld()));
// particle
scene.world.removeItemsFromBelt(depotPos);
ItemStack polished = AllItems.POLISHED_ROSE_QUARTZ.asStack();
scene.world.createItemOnBeltLike(depotPos, Direction.UP, polished);
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(polished), 50);
scene.idle(60);
scene.world.hideIndependentSection(depot, Direction.NORTH);
scene.idle(5);
scene.world.showSection(util.select.fromTo(0, 1, 3, 0, 2, 3), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.fromTo(4, 1, 2, 0, 2, 2), Direction.SOUTH);
scene.idle(20);
BlockPos beltPos = util.grid.at(0, 1, 2);
scene.overlay.showText(40).pointAt(util.vector.blockSurface(beltPos, Direction.WEST)).placeNearTarget().attachKeyFrame().text("When items are provided on a belt...");
scene.idle(30);
ElementLink<BeltItemElement> ingot = scene.world.createItemOnBelt(beltPos, Direction.SOUTH, quartz);
scene.idle(15);
ElementLink<BeltItemElement> ingot2 = scene.world.createItemOnBelt(beltPos, Direction.SOUTH, quartz);
scene.idle(15);
scene.world.stallBeltItem(ingot, true);
scene.world.moveDeployer(pressPos, 1, 30);
scene.overlay.showText(50).pointAt(pressSide).placeNearTarget().attachKeyFrame().text("The Deployer will hold and process them automatically");
scene.idle(30);
scene.world.moveDeployer(pressPos, -1, 30);
scene.debug.enqueueCallback(s -> SandPaperItem.spawnParticles(targetV, quartz, s.getWorld()));
scene.world.removeItemsFromBelt(pressPos.below(2));
ingot = scene.world.createItemOnBelt(pressPos.below(2), Direction.UP, polished);
scene.world.stallBeltItem(ingot, true);
scene.idle(15);
scene.world.stallBeltItem(ingot, false);
scene.idle(15);
scene.world.stallBeltItem(ingot2, true);
scene.world.moveDeployer(pressPos, 1, 30);
scene.idle(30);
scene.world.moveDeployer(pressPos, -1, 30);
scene.debug.enqueueCallback(s -> SandPaperItem.spawnParticles(targetV, quartz, s.getWorld()));
scene.world.removeItemsFromBelt(pressPos.below(2));
ingot2 = scene.world.createItemOnBelt(pressPos.below(2), Direction.UP, polished);
scene.world.stallBeltItem(ingot2, true);
scene.idle(15);
scene.world.stallBeltItem(ingot2, false);
}
Aggregations