Search in sources :

Example 66 with Selection

use of com.simibubi.create.foundation.ponder.Selection in project Create by Creators-of-Create.

the class PistonScenes method movement.

public static void movement(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("mechanical_piston", "Moving Structures using Mechanical Pistons");
    scene.configureBasePlate(0, 0, 5);
    scene.world.showSection(util.select.layer(0).add(util.select.position(0, 1, 2)), 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(15);
    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.overlay.showText(55).pointAt(util.vector.topOf(piston)).placeNearTarget().attachKeyFrame().text("Mechanical Pistons can move blocks in front of them");
    scene.idle(65);
    scene.overlay.showText(45).pointAt(util.vector.blockSurface(shaft, Direction.SOUTH)).placeNearTarget().text("Speed and direction of movement depend on the Rotational Input");
    scene.world.setBlock(util.grid.at(2, 1, 1), Blocks.AIR.defaultBlockState(), false);
    scene.world.setBlock(util.grid.at(0, 1, 2), Blocks.OAK_PLANKS.defaultBlockState(), false);
    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(60);
    scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(piston, Direction.WEST), Pointing.DOWN).rightClick().withItem(new ItemStack(Items.SLIME_BALL)), 30);
    scene.idle(7);
    scene.world.modifyBlock(piston.north(), s -> s.setValue(MechanicalPistonHeadBlock.TYPE, PistonType.STICKY), false);
    scene.effects.superGlue(piston, Direction.WEST, true);
    scene.idle(33);
    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(25);
    scene.overlay.showText(60).pointAt(util.vector.topOf(piston)).placeNearTarget().attachKeyFrame().text("Sticky Mechanical Pistons can pull the attached blocks back");
    scene.idle(20);
    scene.world.setBlock(util.grid.at(2, 1, 1), Blocks.OAK_PLANKS.defaultBlockState(), false);
    scene.world.setBlock(util.grid.at(0, 1, 2), Blocks.AIR.defaultBlockState(), false);
    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.world.setBlock(util.grid.at(2, 1, 1), Blocks.AIR.defaultBlockState(), false);
    ElementLink<WorldSectionElement> chassis = scene.world.showIndependentSection(util.select.fromTo(2, 2, 0, 2, 3, 2), Direction.DOWN);
    scene.world.moveSection(chassis, util.vector.of(0, -1, 1), 0);
    scene.addKeyframe();
    scene.idle(5);
    scene.world.showSectionAndMerge(util.select.position(1, 2, 0), Direction.EAST, chassis);
    scene.idle(15);
    scene.effects.superGlue(piston.west().north(), Direction.WEST, true);
    scene.overlay.showText(80).pointAt(util.vector.topOf(piston.west())).placeNearTarget().sharedText("movement_anchors");
    scene.idle(90);
    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.moveSection(chassis, util.vector.of(-2, 0, 0), 40);
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement) ItemStack(net.minecraft.world.item.ItemStack)

Example 67 with Selection

use of com.simibubi.create.foundation.ponder.Selection 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");
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement)

Example 68 with Selection

use of com.simibubi.create.foundation.ponder.Selection 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);
}
Also used : FaceCursorPose(com.simibubi.create.foundation.ponder.element.ParrotElement.FaceCursorPose) Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement) ParrotElement(com.simibubi.create.foundation.ponder.element.ParrotElement)

Example 69 with Selection

use of com.simibubi.create.foundation.ponder.Selection 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);
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) Vec3(net.minecraft.world.phys.Vec3) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement) ItemStack(net.minecraft.world.item.ItemStack) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) BeltItemElement(com.simibubi.create.foundation.ponder.element.BeltItemElement)

Example 70 with Selection

use of com.simibubi.create.foundation.ponder.Selection in project Create by Creators-of-Create.

the class ProcessingScenes method crushingWheels.

public static void crushingWheels(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("crushing_wheels", "Processing Items with Crushing Wheels");
    scene.configureBasePlate(0, 0, 5);
    scene.scaleSceneView(.9f);
    Selection wheels = util.select.fromTo(3, 2, 2, 1, 2, 2);
    Selection kinetics = util.select.fromTo(0, 1, 5, 4, 1, 3);
    Selection kinetics2 = util.select.fromTo(0, 2, 5, 4, 2, 3);
    Selection beltCog = util.select.position(5, 0, 1);
    scene.world.setKineticSpeed(wheels, 0);
    scene.world.setBlock(util.grid.at(2, 3, 2), Blocks.AIR.defaultBlockState(), false);
    scene.world.showSection(util.select.layer(0).substract(beltCog), Direction.UP);
    scene.idle(5);
    Selection belt = util.select.fromTo(4, 1, 2, 4, 4, 2).add(util.select.fromTo(4, 3, 3, 4, 4, 3)).add(util.select.position(3, 3, 2)).add(util.select.position(2, 3, 2));
    Selection bottomBelt = util.select.fromTo(5, 1, 0, 2, 1, 0).add(util.select.fromTo(2, 1, 2, 2, 1, 1));
    BlockPos center = util.grid.at(2, 2, 2);
    Selection wWheel = util.select.position(center.west());
    Selection eWheel = util.select.position(center.east());
    scene.world.showSection(wWheel, Direction.SOUTH);
    scene.idle(3);
    scene.world.showSection(eWheel, Direction.SOUTH);
    scene.idle(10);
    Vec3 centerTop = util.vector.topOf(center);
    scene.overlay.showText(60).attachKeyFrame().text("A pair of Crushing Wheels can grind items very effectively").pointAt(centerTop).placeNearTarget();
    scene.idle(70);
    scene.world.showSection(kinetics, Direction.DOWN);
    scene.idle(3);
    scene.world.showSection(kinetics2, Direction.DOWN);
    scene.world.setKineticSpeed(wWheel, -16);
    scene.world.setKineticSpeed(eWheel, 16);
    scene.idle(5);
    scene.effects.rotationDirectionIndicator(center.west());
    scene.effects.rotationDirectionIndicator(center.east());
    scene.idle(10);
    scene.overlay.showText(60).attachKeyFrame().text("Their Rotational Input has to make them spin into each other").pointAt(util.vector.blockSurface(center.west(), Direction.NORTH)).placeNearTarget();
    scene.idle(40);
    scene.effects.rotationDirectionIndicator(center.west());
    scene.effects.rotationDirectionIndicator(center.east());
    scene.idle(30);
    ItemStack input = new ItemStack(Items.GOLD_ORE);
    ItemStack output = new ItemStack(Items.RAW_GOLD);
    Vec3 entitySpawn = util.vector.topOf(center.above(2));
    ElementLink<EntityElement> entity1 = scene.world.createItemEntity(entitySpawn, util.vector.of(0, 0.2, 0), input);
    scene.idle(18);
    scene.world.modifyEntity(entity1, Entity::discard);
    Emitter blockSpace = Emitter.withinBlockSpace(new ItemParticleOption(ParticleTypes.ITEM, input), util.vector.of(0, 0, 0));
    scene.effects.emitParticles(util.vector.centerOf(center).add(0, -0.2, 0), blockSpace, 3, 40);
    scene.idle(10);
    scene.overlay.showControls(new InputWindowElement(centerTop, Pointing.DOWN).withItem(input), 30);
    scene.idle(7);
    scene.overlay.showText(50).attachKeyFrame().text("Items thrown or inserted into the top will get processed").pointAt(centerTop).placeNearTarget();
    scene.idle(60);
    scene.world.createItemEntity(centerTop.add(0, -1.4, 0), util.vector.of(0, 0, 0), output);
    scene.idle(10);
    scene.world.createItemEntity(centerTop.add(0, -1.4, 0), util.vector.of(0, 0, 0), output);
    scene.overlay.showControls(new InputWindowElement(centerTop.add(0, -2, 0), Pointing.UP).withItem(output), 30);
    scene.idle(40);
    scene.world.restoreBlocks(util.select.position(2, 3, 2));
    scene.world.showSection(belt, Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(beltCog, Direction.UP);
    scene.idle(5);
    scene.world.modifyEntities(ItemEntity.class, Entity::discard);
    scene.world.showSection(bottomBelt, Direction.SOUTH);
    scene.idle(5);
    scene.overlay.showText(50).attachKeyFrame().text("Items can be inserted and picked up through automated means as well").pointAt(centerTop.add(0, .5, 0)).placeNearTarget();
    scene.idle(40);
    for (int i = 0; i < 5; i++) {
        if (i < 4)
            scene.world.createItemOnBelt(util.grid.at(4, 4, 2), Direction.EAST, input);
        scene.idle(15);
        if (i < 3)
            scene.world.createItemOnBelt(util.grid.at(4, 4, 2), Direction.EAST, input);
        scene.idle(15);
        if (i > 0) {
            scene.world.createItemOnBelt(center.below(), Direction.UP, output);
            scene.idle(15);
            scene.world.createItemOnBelt(center.below(), Direction.UP, output);
        }
        scene.world.removeItemsFromBelt(util.grid.at(3, 3, 2));
        if (i < 4)
            scene.effects.emitParticles(util.vector.centerOf(center).add(0, -0.2, 0), blockSpace, 3, 28);
        if (i == 0)
            scene.markAsFinished();
    }
}
Also used : BasinTileEntity(com.simibubi.create.content.contraptions.processing.BasinTileEntity) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) DeployerTileEntity(com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity) Entity(net.minecraft.world.entity.Entity) ItemEntity(net.minecraft.world.entity.item.ItemEntity) MillstoneTileEntity(com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity) MechanicalMixerTileEntity(com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity) Emitter(com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter) Selection(com.simibubi.create.foundation.ponder.Selection) Vec3(net.minecraft.world.phys.Vec3) ItemParticleOption(net.minecraft.core.particles.ItemParticleOption) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) EntityElement(com.simibubi.create.foundation.ponder.element.EntityElement) ItemStack(net.minecraft.world.item.ItemStack)

Aggregations

Selection (com.simibubi.create.foundation.ponder.Selection)94 BlockPos (net.minecraft.core.BlockPos)84 WorldSectionElement (com.simibubi.create.foundation.ponder.element.WorldSectionElement)59 InputWindowElement (com.simibubi.create.foundation.ponder.element.InputWindowElement)57 Vec3 (net.minecraft.world.phys.Vec3)51 ItemStack (net.minecraft.world.item.ItemStack)46 Entity (net.minecraft.world.entity.Entity)15 AABB (net.minecraft.world.phys.AABB)14 EntityElement (com.simibubi.create.foundation.ponder.element.EntityElement)11 ItemEntity (net.minecraft.world.entity.item.ItemEntity)11 FluidStack (net.minecraftforge.fluids.FluidStack)10 SceneBuilder (com.simibubi.create.foundation.ponder.SceneBuilder)8 Direction (net.minecraft.core.Direction)8 ElementLink (com.simibubi.create.foundation.ponder.ElementLink)7 PonderPalette (com.simibubi.create.foundation.ponder.PonderPalette)7 SceneBuildingUtil (com.simibubi.create.foundation.ponder.SceneBuildingUtil)7 BlockState (net.minecraft.world.level.block.state.BlockState)7 CapabilityFluidHandler (net.minecraftforge.fluids.capability.CapabilityFluidHandler)6 FluidAction (net.minecraftforge.fluids.capability.IFluidHandler.FluidAction)6 ParrotElement (com.simibubi.create.foundation.ponder.element.ParrotElement)5