use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class KineticsScenes method sequencedGearshift.
public static void sequencedGearshift(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("sequenced_gearshift", "Controlling Rotational Speed using Sequenced Gearshifts");
scene.configureBasePlate(1, 0, 5);
scene.showBasePlate();
Selection redstone = util.select.fromTo(3, 1, 0, 3, 1, 1);
scene.world.showSection(util.select.position(6, 0, 3).add(redstone), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.fromTo(6, 1, 2, 4, 1, 2), Direction.DOWN);
BlockPos gearshiftPos = util.grid.at(3, 1, 2);
Selection gearshiftSelection = util.select.position(gearshiftPos);
BlockPos bearingPos = util.grid.at(1, 1, 2);
BlockPos buttonPos = util.grid.at(3, 1, 0);
Selection outputKinetics = util.select.fromTo(3, 1, 2, 1, 1, 2);
scene.world.setKineticSpeed(gearshiftSelection, 0);
scene.idle(10);
scene.world.showSection(gearshiftSelection, Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.fromTo(2, 1, 2, 1, 1, 2), Direction.EAST);
scene.idle(10);
Vec3 top = util.vector.topOf(gearshiftPos);
scene.overlay.showText(60).text("Seq. Gearshifts relay rotation by following a timed list of instructions").attachKeyFrame().pointAt(top).placeNearTarget();
scene.idle(80);
scene.overlay.showControls(new InputWindowElement(top, Pointing.DOWN).rightClick(), 40);
scene.idle(7);
scene.overlay.showSelectionWithText(gearshiftSelection, 50).colored(PonderPalette.BLUE).text("Right-click it to open the Configuration UI").pointAt(top).placeNearTarget();
scene.idle(60);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.fromTo(0, 3, 2, 0, 0, 2), Direction.EAST);
scene.world.configureCenterOfRotation(contraption, util.vector.centerOf(bearingPos));
scene.idle(20);
scene.world.toggleRedstonePower(redstone);
scene.effects.indicateRedstone(buttonPos);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 16);
scene.world.rotateBearing(bearingPos, 90, 40);
scene.world.rotateSection(contraption, 90, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.idle(20);
scene.world.toggleRedstonePower(redstone);
scene.idle(20);
scene.overlay.showText(80).text("Upon receiving a Redstone Signal, it will start running its configured sequence").attachKeyFrame().pointAt(top);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, -32);
scene.world.rotateBearing(bearingPos, -180, 40);
scene.world.rotateSection(contraption, -180, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.idle(40);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 0);
scene.idle(20);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 16);
scene.world.rotateBearing(bearingPos, 90, 40);
scene.world.rotateSection(contraption, 90, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.idle(40);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 0);
scene.idle(20);
scene.overlay.showText(70).text("Once finished, it waits for the next Redstone Signal and starts over").pointAt(util.vector.topOf(util.grid.at(3, 0, 1)));
scene.idle(80);
scene.idle(20);
scene.world.toggleRedstonePower(redstone);
scene.effects.indicateRedstone(buttonPos);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 16);
scene.world.rotateBearing(bearingPos, 90, 40);
scene.world.rotateSection(contraption, 90, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.idle(20);
scene.overlay.showText(60).text("A redstone comparator can be used to read the current progress").attachKeyFrame().pointAt(util.vector.topOf(util.grid.at(3, 0, 1)));
scene.world.hideSection(redstone, Direction.NORTH);
scene.idle(15);
BlockPos wire = util.grid.at(5, 1, 0);
Selection nixie = util.select.position(4, 1, 0);
ElementLink<WorldSectionElement> comparator = scene.world.showIndependentSection(util.select.fromTo(5, 1, 1, 4, 1, 0), Direction.SOUTH);
scene.world.moveSection(comparator, util.vector.of(-2, 0, 0), 0);
scene.world.toggleRedstonePower(util.select.position(5, 1, 1));
scene.world.cycleBlockProperty(wire, RedStoneWireBlock.POWER);
scene.world.modifyTileNBT(nixie, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 1));
scene.idle(5);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, -32);
scene.world.rotateBearing(bearingPos, -180, 40);
scene.world.rotateSection(contraption, -180, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.world.cycleBlockProperty(wire, RedStoneWireBlock.POWER);
scene.world.modifyTileNBT(nixie, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 2));
scene.idle(40);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 0);
scene.world.cycleBlockProperty(wire, RedStoneWireBlock.POWER);
scene.world.modifyTileNBT(nixie, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 3));
scene.idle(20);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.setKineticSpeed(outputKinetics, 16);
scene.world.rotateBearing(bearingPos, 90, 40);
scene.world.rotateSection(contraption, 90, 0, 0, 40);
scene.effects.rotationDirectionIndicator(gearshiftPos.west());
scene.world.cycleBlockProperty(wire, RedStoneWireBlock.POWER);
scene.world.modifyTileNBT(nixie, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 4));
scene.idle(40);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.cycleBlockProperty(gearshiftPos, SequencedGearshiftBlock.STATE);
scene.world.modifyBlock(wire, s -> s.setValue(RedStoneWireBlock.POWER, 0), false);
scene.world.toggleRedstonePower(util.select.position(5, 1, 1));
scene.world.modifyTileNBT(nixie, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 0));
scene.world.setKineticSpeed(outputKinetics, 0);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class KineticsScenes method speedController.
public static void speedController(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("rotation_speed_controller", "Using the Rotational Speed Controller");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
BlockPos cogPos = util.grid.at(1, 2, 1);
Selection gaugeSelect = util.select.position(1, 2, 3);
scene.world.multiplyKineticSpeed(util.select.everywhere(), 0.5f);
scene.world.setKineticSpeed(gaugeSelect, 0);
scene.world.showSection(util.select.fromTo(5, 1, 1, 2, 1, 1), Direction.DOWN);
scene.world.showSection(util.select.fromTo(1, 1, 3, 1, 2, 3), Direction.DOWN);
scene.idle(10);
ElementLink<WorldSectionElement> rsc = scene.world.showIndependentSection(util.select.position(0, 1, 1), Direction.DOWN);
scene.world.moveSection(rsc, util.vector.of(1, 0, 0), 0);
ElementLink<WorldSectionElement> rsc2 = scene.world.showIndependentSection(util.select.position(1, 1, 1), Direction.DOWN);
scene.world.moveSection(rsc2, util.vector.of(0, -100, 0), 0);
scene.idle(10);
scene.world.showSection(util.select.position(1, 2, 1), Direction.DOWN);
scene.idle(15);
scene.effects.indicateSuccess(cogPos);
scene.world.moveSection(rsc2, util.vector.of(0, 100, 0), 0);
scene.world.moveSection(rsc, util.vector.of(0, -100, 0), 0);
scene.idle(5);
scene.world.showSection(util.select.position(1, 2, 2), Direction.DOWN);
scene.idle(10);
scene.world.setKineticSpeed(gaugeSelect, 8);
scene.effects.indicateSuccess(util.grid.at(1, 2, 3));
scene.overlay.showText(90).placeNearTarget().attachKeyFrame().pointAt(util.vector.blockSurface(cogPos, Direction.NORTH)).text("Rot. Speed Controllers relay rotation from their axis to a Large Cogwheel above them");
scene.idle(100);
Vec3 inputVec = util.vector.of(1.5, 1.75, 1);
scene.overlay.showFilterSlotInput(inputVec, 60);
scene.overlay.showText(70).placeNearTarget().attachKeyFrame().pointAt(inputVec).text("Using the scroll input on its side, the conveyed speed can be configured");
scene.idle(80);
InputWindowElement input = new InputWindowElement(inputVec, Pointing.UP).scroll();
scene.overlay.showControls(input, 40);
scene.idle(15);
scene.world.multiplyKineticSpeed(util.select.fromTo(1, 2, 1, 1, 2, 3), 4);
scene.effects.rotationSpeedIndicator(cogPos);
scene.idle(55);
scene.markAsFinished();
scene.overlay.showControls(input, 30);
scene.idle(15);
scene.world.multiplyKineticSpeed(util.select.fromTo(1, 2, 1, 1, 2, 3), 4);
scene.effects.rotationSpeedIndicator(cogPos);
scene.idle(55);
scene.overlay.showControls(input, 30);
scene.idle(15);
scene.world.multiplyKineticSpeed(util.select.fromTo(1, 2, 1, 1, 2, 3), -.05f);
scene.effects.rotationSpeedIndicator(cogPos);
scene.idle(35);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class MechanicalDrillScenes method contraption.
public static void contraption(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_drill_contraption", "Using Mechanical Drills on Contraptions");
scene.configureBasePlate(0, 0, 6);
scene.world.showSection(util.select.layer(0), Direction.UP);
Selection kinetics = util.select.fromTo(5, 1, 2, 5, 1, 6);
scene.idle(5);
ElementLink<WorldSectionElement> pistonHead = scene.world.showIndependentSection(util.select.fromTo(5, 1, 1, 7, 1, 1), Direction.DOWN);
scene.world.moveSection(pistonHead, util.vector.of(0, 0, 1), 0);
scene.world.showSection(kinetics, Direction.DOWN);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.fromTo(4, 2, 3, 4, 1, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(3, 1, 3), Direction.EAST, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(3, 1, 2), Direction.EAST, contraption);
scene.world.showSectionAndMerge(util.select.position(3, 2, 3), Direction.EAST, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(3, 2, 2), Direction.EAST, contraption);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.topOf(util.grid.at(3, 2, 3))).text("Whenever Drills are moved as part of an animated Contraption...");
scene.idle(70);
Selection drills = util.select.fromTo(3, 1, 2, 3, 2, 3);
Selection planks = util.select.fromTo(1, 1, 2, 1, 2, 3);
scene.world.showSection(planks, Direction.DOWN);
scene.world.setKineticSpeed(util.select.position(4, 0, 6), -8);
scene.world.setKineticSpeed(kinetics, 16);
scene.world.setKineticSpeed(drills, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(drills, 64);
BlockPos p1 = util.grid.at(1, 1, 2);
BlockPos p2 = util.grid.at(1, 1, 3);
BlockPos p3 = util.grid.at(1, 2, 2);
BlockPos p4 = util.grid.at(1, 2, 3);
for (int i = 0; i < 10; i++) {
scene.idle(3);
scene.world.incrementBlockBreakingProgress(p1);
scene.world.incrementBlockBreakingProgress(p2);
scene.world.incrementBlockBreakingProgress(p3);
scene.world.incrementBlockBreakingProgress(p4);
if (i == 2) {
scene.overlay.showText(80).placeNearTarget().pointAt(util.vector.topOf(p3)).text("...they will break blocks the contraption runs them into");
}
}
Vec3 m = util.vector.of(-.1, 0, 0);
ItemStack item = new ItemStack(Items.OAK_PLANKS);
scene.world.createItemEntity(util.vector.centerOf(p1), m, item);
scene.world.createItemEntity(util.vector.centerOf(p2), m, item);
scene.world.createItemEntity(util.vector.centerOf(p3), m, item);
scene.world.createItemEntity(util.vector.centerOf(p4), m, item);
scene.world.setKineticSpeed(drills, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(drills, 0);
scene.idle(20);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(2, 0, 0), 40);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.world.hideSection(planks, Direction.UP);
scene.idle(40);
scene.world.setBlocks(planks, Blocks.OAK_PLANKS.defaultBlockState(), false);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
scene.world.glueBlockOnto(util.grid.at(4, 3, 2), Direction.DOWN, contraption);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(4, 3, 2), Direction.WEST)).sharedText("storage_on_contraption");
scene.idle(70);
scene.world.showSection(planks, Direction.DOWN);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.setKineticSpeed(drills, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(drills, 64);
for (int i = 0; i < 10; i++) {
scene.idle(3);
scene.world.incrementBlockBreakingProgress(p1);
scene.world.incrementBlockBreakingProgress(p2);
scene.world.incrementBlockBreakingProgress(p3);
scene.world.incrementBlockBreakingProgress(p4);
}
scene.world.setKineticSpeed(drills, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(drills, 0);
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(2, 3, 2), Pointing.DOWN).withItem(new ItemStack(Blocks.OAK_PLANKS)), 60);
scene.idle(20);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class MovementActorScenes method plough.
public static void plough(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_plough", "Using Mechanical Ploughs on Contraptions");
scene.configureBasePlate(0, 0, 6);
scene.scaleSceneView(0.9f);
Selection garbage = util.select.fromTo(2, 1, 3, 1, 1, 2);
Selection kinetics = util.select.fromTo(5, 1, 6, 5, 1, 2);
Selection dynamic = util.select.fromTo(4, 0, 6, 5, 1, 6);
scene.showBasePlate();
ElementLink<WorldSectionElement> cogs = scene.world.showIndependentSection(util.select.fromTo(4, 0, 6, 5, 1, 6), Direction.UP);
scene.idle(5);
scene.world.showSection(kinetics.substract(dynamic), Direction.DOWN);
ElementLink<WorldSectionElement> pistonHead = scene.world.showIndependentSection(util.select.fromTo(5, 1, 1, 7, 1, 1), Direction.DOWN);
scene.world.moveSection(pistonHead, util.vector.of(0, 0, 1), 0);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.fromTo(4, 1, 3, 4, 1, 2), Direction.DOWN);
scene.idle(10);
scene.world.showSectionAndMerge(util.select.position(3, 1, 3), Direction.EAST, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(3, 1, 2), Direction.EAST, contraption);
scene.idle(20);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(3, 1, 3), Direction.EAST)).text("Whenever Ploughs are moved as part of an animated Contraption...");
scene.idle(50);
scene.world.showSection(garbage, Direction.EAST);
scene.idle(20);
scene.world.setKineticSpeed(util.select.position(4, 0, 6), -8);
scene.world.setKineticSpeed(kinetics, 16);
scene.world.moveSection(pistonHead, util.vector.of(-2, 0, 0), 60);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 60);
scene.idle(15);
Vec3 m = util.vector.of(-0.1, .2, 0);
scene.world.destroyBlock(util.grid.at(2, 1, 3));
scene.world.createItemEntity(util.vector.centerOf(2, 1, 3), m, new ItemStack(Items.LEVER));
scene.world.destroyBlock(util.grid.at(2, 1, 2));
scene.world.createItemEntity(util.vector.centerOf(2, 1, 2), m, new ItemStack(Items.TORCH));
scene.idle(30);
scene.world.destroyBlock(util.grid.at(1, 1, 3));
scene.world.createItemEntity(util.vector.centerOf(1, 1, 3), m, new ItemStack(Items.RAIL));
scene.world.destroyBlock(util.grid.at(1, 1, 2));
scene.world.createItemEntity(util.vector.centerOf(1, 1, 2), m, new ItemStack(Items.REDSTONE));
scene.overlay.showText(60).placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(1, 1, 3), Direction.EAST)).text("...they will break blocks without a solid collision hitbox");
scene.idle(50);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(2, 0, 0), 40);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.world.hideSection(garbage, Direction.UP);
scene.idle(40);
scene.world.setBlocks(garbage, Blocks.SNOW.defaultBlockState(), false);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
ElementLink<WorldSectionElement> chest = scene.world.showIndependentSection(util.select.position(4, 2, 2), Direction.DOWN);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(4, 2, 2), Direction.WEST)).sharedText("storage_on_contraption");
scene.idle(15);
scene.effects.superGlue(util.grid.at(4, 2, 2), Direction.DOWN, true);
scene.idle(45);
scene.world.showSection(garbage, Direction.EAST);
scene.idle(20);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(-2, 0, 0), 60);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 60);
scene.world.moveSection(chest, util.vector.of(-2, 0, 0), 60);
scene.idle(15);
scene.world.destroyBlock(util.grid.at(2, 1, 3));
scene.world.destroyBlock(util.grid.at(2, 1, 2));
scene.idle(30);
scene.world.destroyBlock(util.grid.at(1, 1, 3));
scene.world.destroyBlock(util.grid.at(1, 1, 2));
scene.idle(15);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(2, 2, 2), Pointing.DOWN).withItem(new ItemStack(Items.SNOWBALL)), 40);
scene.idle(40);
scene.world.hideIndependentSection(chest, Direction.UP);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(2, 0, 0), 40);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.idle(40);
Selection dirt = util.select.fromTo(2, 0, 3, 1, 0, 2);
scene.world.hideSection(dirt, Direction.DOWN);
scene.idle(15);
scene.world.setBlocks(dirt, Blocks.GRASS_BLOCK.defaultBlockState(), false);
scene.world.showSection(dirt, Direction.UP);
scene.overlay.showText(60).placeNearTarget().attachKeyFrame().pointAt(util.vector.blockSurface(util.grid.at(3, 1, 3), Direction.EAST)).text("Additionally, ploughs can create farmland");
scene.idle(30);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(-2, 0, 0), 60);
scene.world.moveSection(contraption, util.vector.of(-2, 0, 0), 60);
scene.world.moveSection(chest, util.vector.of(-2, 0, 0), 60);
scene.idle(15);
scene.world.setBlocks(util.select.fromTo(2, 0, 2, 2, 0, 3), Blocks.FARMLAND.defaultBlockState(), true);
scene.idle(30);
scene.world.setBlocks(util.select.fromTo(1, 0, 2, 1, 0, 3), Blocks.FARMLAND.defaultBlockState(), true);
scene.idle(20);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(2, 0, 0), 40);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.idle(50);
scene.world.setKineticSpeed(util.select.everywhere(), 0);
scene.world.hideSection(kinetics.substract(dynamic), Direction.EAST);
scene.world.hideSection(dirt, Direction.DOWN);
scene.world.hideIndependentSection(pistonHead, Direction.EAST);
scene.world.moveSection(cogs, util.vector.of(-1, 0, 0), 15);
scene.idle(15);
scene.world.restoreBlocks(dirt);
scene.world.showSection(dirt, Direction.UP);
scene.world.showSection(util.select.fromTo(4, 1, 6, 4, 3, 4), Direction.NORTH);
scene.idle(15);
scene.world.showSectionAndMerge(util.select.fromTo(4, 3, 3, 4, 2, 3), Direction.DOWN, contraption);
scene.idle(15);
BlockPos bearingPos = util.grid.at(4, 3, 4);
scene.addKeyframe();
scene.world.setKineticSpeed(util.select.position(4, 0, 6), 8);
scene.world.setKineticSpeed(util.select.position(5, 1, 6), -16);
scene.world.setKineticSpeed(util.select.position(4, 3, 5), -16);
scene.world.setKineticSpeed(util.select.position(4, 1, 5), -16);
scene.world.setKineticSpeed(util.select.position(4, 2, 5), 16);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -2 * f);
scene.world.configureCenterOfRotation(contraption, util.vector.centerOf(bearingPos));
scene.world.rotateSection(contraption, 0, 0, 90, 20);
scene.world.rotateBearing(bearingPos, 90, 20);
scene.idle(10);
ElementLink<ParrotElement> birb = scene.special.createBirb(util.vector.topOf(3, 0, 2).add(0, 0, 0.5), FlappyPose::new);
scene.idle(11);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -2 * f);
scene.world.rotateSection(contraption, 0, 0, -135, 10);
scene.world.rotateBearing(bearingPos, -135, 10);
scene.idle(7);
scene.special.moveParrot(birb, util.vector.of(-20, 15, 0), 20);
scene.special.rotateParrot(birb, 0, 360, 0, 20);
scene.idle(3);
scene.world.setKineticSpeed(util.select.everywhere(), 0);
scene.idle(20);
scene.overlay.showText(60).placeNearTarget().pointAt(util.vector.centerOf(util.grid.at(1, 3, 2))).text("...they can also launch entities without hurting them");
scene.idle(30);
}
use of com.simibubi.create.foundation.ponder.element.WorldSectionElement in project Create by Creators-of-Create.
the class MovementActorScenes method psiRedstone.
public static void psiRedstone(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("portable_storage_interface_redstone", "Redstone Control");
scene.configureBasePlate(0, 0, 5);
scene.setSceneOffsetY(-1);
Class<PortableStorageInterfaceTileEntity> psiClass = PortableStorageInterfaceTileEntity.class;
Selection psis = util.select.fromTo(1, 1, 3, 1, 3, 3);
scene.world.modifyTileNBT(psis, psiClass, nbt -> {
nbt.putFloat("Distance", 1);
nbt.putFloat("Timer", 40);
});
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.layer(1), Direction.DOWN);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.layersFrom(2), Direction.DOWN);
BlockPos bearing = util.grid.at(3, 1, 3);
scene.world.configureCenterOfRotation(contraption, util.vector.topOf(bearing));
scene.idle(20);
scene.world.modifyTileNBT(psis, psiClass, nbt -> nbt.putFloat("Timer", 9));
scene.idle(20);
scene.world.rotateBearing(bearing, 360 * 3 + 270, 240 + 60);
scene.world.rotateSection(contraption, 0, 360 * 3 + 270, 0, 240 + 60);
scene.idle(20);
scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 1, 1, 1, 2));
scene.effects.indicateRedstone(util.grid.at(1, 1, 1));
scene.idle(10);
scene.overlay.showSelectionWithText(util.select.position(1, 1, 3), 120).colored(PonderPalette.RED).text("Redstone power will prevent the stationary interface from engaging");
scene.idle(20);
scene.markAsFinished();
}
Aggregations