Search in sources :

Example 1 with ParrotElement

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

the class FanScenes method direction.

public static void direction(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("fan_direction", "Air flow of Encased Fans");
    scene.configureBasePlate(0, 1, 5);
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(3, 1, 0, 3, 1, 5).add(util.select.position(3, 2, 4)), Direction.DOWN);
    scene.world.showSection(util.select.fromTo(2, 1, 5, 1, 1, 5), Direction.DOWN);
    scene.idle(10);
    BlockPos fanPos = util.grid.at(1, 1, 4);
    scene.world.showSection(util.select.position(fanPos), Direction.SOUTH);
    scene.idle(40);
    scene.effects.rotationDirectionIndicator(fanPos.south());
    ElementLink<ParrotElement> flappyBirb = scene.special.createBirb(util.vector.topOf(1, 0, 3), FlappyPose::new);
    scene.idle(2);
    scene.special.rotateParrot(flappyBirb, 0, 235, 0, 30);
    scene.special.moveParrot(flappyBirb, util.vector.of(0, 0, -2.5), 30);
    scene.idle(20);
    scene.overlay.showText(80).text("Encased Fans use Rotational Force to create an Air Current").attachKeyFrame().placeNearTarget().pointAt(util.vector.topOf(fanPos));
    scene.idle(90);
    BlockPos leverPos = util.grid.at(3, 2, 4);
    Selection reverse = util.select.fromTo(3, 1, 5, 1, 1, 4);
    scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
    scene.effects.indicateRedstone(leverPos);
    scene.addKeyframe();
    scene.world.modifyKineticSpeed(reverse, f -> -f);
    scene.effects.rotationDirectionIndicator(fanPos.south());
    scene.special.rotateParrot(flappyBirb, 0, 215 * 2, 0, 30);
    scene.special.moveParrot(flappyBirb, util.vector.of(0, 0, 2.5), 30);
    scene.idle(31);
    scene.overlay.showText(60).text("Strength and Direction of Flow depends on the Rotational Input").placeNearTarget().pointAt(util.vector.topOf(fanPos));
    scene.markAsFinished();
    scene.idle(70);
    scene.world.toggleRedstonePower(util.select.fromTo(leverPos, leverPos.below()));
    scene.effects.indicateRedstone(leverPos);
    scene.world.modifyKineticSpeed(reverse, f -> -f);
    scene.world.modifyKineticSpeed(util.select.everywhere(), f -> 4 * f);
    scene.effects.rotationSpeedIndicator(fanPos.south());
    scene.special.rotateParrot(flappyBirb, 0, 245 * 4, 0, 30);
    scene.special.moveParrot(flappyBirb, util.vector.of(0, 0, -20), 30);
}
Also used : FlappyPose(com.simibubi.create.foundation.ponder.element.ParrotElement.FlappyPose) Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) ParrotElement(com.simibubi.create.foundation.ponder.element.ParrotElement)

Example 2 with ParrotElement

use of com.simibubi.create.foundation.ponder.element.ParrotElement 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);
}
Also used : HarvesterTileEntity(com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity) Entity(net.minecraft.world.entity.Entity) ItemEntity(net.minecraft.world.entity.item.ItemEntity) PortableItemInterfaceTileEntity(com.simibubi.create.content.contraptions.components.actors.PortableItemInterfaceTileEntity) PortableStorageInterfaceTileEntity(com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceTileEntity) FlappyPose(com.simibubi.create.foundation.ponder.element.ParrotElement.FlappyPose) 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) ParrotElement(com.simibubi.create.foundation.ponder.element.ParrotElement) ItemStack(net.minecraft.world.item.ItemStack)

Example 3 with ParrotElement

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

the class BeltScenes method transport.

public static void transport(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("belt_transport", "Using Mechanical Belts for Logistics");
    scene.configureBasePlate(0, 0, 5);
    scene.setSceneOffsetY(-1);
    scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -.6f * f);
    scene.showBasePlate();
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(1, 1, 3, 2, 1, 5), Direction.DOWN);
    scene.idle(20);
    scene.world.showSection(util.select.fromTo(2, 1, 2, 4, 3, 2), Direction.SOUTH);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(1, 1, 2, 0, 1, 2), Direction.SOUTH);
    scene.idle(10);
    scene.special.movePointOfInterest(util.grid.at(2, 2, 0));
    ItemStack stack = new ItemStack(Items.COPPER_BLOCK);
    ElementLink<EntityElement> item = scene.world.createItemEntity(util.vector.centerOf(0, 4, 2), util.vector.of(0, 0, 0), stack);
    scene.idle(13);
    scene.world.modifyEntity(item, Entity::discard);
    BlockPos beltEnd = util.grid.at(0, 1, 2);
    scene.world.createItemOnBelt(beltEnd, Direction.DOWN, stack);
    scene.idle(20);
    ElementLink<ParrotElement> parrot = scene.special.createBirb(util.vector.topOf(0, 1, 2).add(0, -3 / 16f, 0), FacePointOfInterestPose::new);
    scene.special.moveParrot(parrot, util.vector.of(1.78, 0, 0), 40);
    scene.special.movePointOfInterest(util.grid.at(1, 1, 3));
    scene.overlay.showText(60).placeNearTarget().pointAt(util.vector.topOf(beltEnd)).text("Moving belts will transport Items and other Entities");
    scene.idle(20);
    item = scene.world.createItemEntity(util.vector.centerOf(0, 4, 2), util.vector.of(0, 0, 0), stack);
    scene.special.movePointOfInterest(util.grid.at(0, 3, 2));
    scene.idle(10);
    scene.special.movePointOfInterest(beltEnd);
    scene.idle(3);
    scene.world.modifyEntity(item, Entity::discard);
    scene.world.createItemOnBelt(beltEnd, Direction.DOWN, stack);
    scene.idle(8);
    scene.special.movePointOfInterest(util.grid.at(3, 2, 1));
    scene.special.moveParrot(parrot, util.vector.of(2.1, 2.1, 0), 60);
    scene.idle(20);
    scene.special.movePointOfInterest(util.grid.at(5, 5, 2));
    scene.idle(30);
    scene.special.movePointOfInterest(util.grid.at(2, 1, 5));
    scene.idle(10);
    scene.special.moveParrot(parrot, util.vector.of(.23, 0, 0), 5);
    scene.idle(5);
    scene.world.setKineticSpeed(util.select.everywhere(), 0f);
    scene.idle(10);
    scene.world.modifyEntities(ItemEntity.class, Entity::discard);
    scene.special.movePointOfInterest(util.grid.at(2, 5, 4));
    Vec3 topOf = util.vector.topOf(util.grid.at(3, 2, 2)).add(-0.1, 0.3, 0);
    scene.overlay.showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick(), 60);
    scene.idle(10);
    scene.overlay.showText(60).placeNearTarget().pointAt(topOf.subtract(0, 0.1, 0)).attachKeyFrame().text("Right-Click with an empty hand to take items off a belt");
    scene.idle(20);
    scene.world.removeItemsFromBelt(util.grid.at(3, 2, 2));
    scene.effects.indicateSuccess(util.grid.at(3, 2, 2));
    scene.idle(20);
    scene.special.changeBirbPose(parrot, FaceCursorPose::new);
}
Also used : MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) BeltTileEntity(com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity) SpoutTileEntity(com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity) Entity(net.minecraft.world.entity.Entity) ItemEntity(net.minecraft.world.entity.item.ItemEntity) FaceCursorPose(com.simibubi.create.foundation.ponder.element.ParrotElement.FaceCursorPose) Vec3(net.minecraft.world.phys.Vec3) FacePointOfInterestPose(com.simibubi.create.foundation.ponder.element.ParrotElement.FacePointOfInterestPose) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) EntityElement(com.simibubi.create.foundation.ponder.element.EntityElement) ParrotElement(com.simibubi.create.foundation.ponder.element.ParrotElement) ItemStack(net.minecraft.world.item.ItemStack)

Example 4 with ParrotElement

use of com.simibubi.create.foundation.ponder.element.ParrotElement 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 5 with ParrotElement

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

the class EjectorScenes method ejector.

public static void ejector(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("weighted_ejector", "Using Weighted Ejectors");
    scene.configureBasePlate(0, 0, 5);
    scene.showBasePlate();
    BlockPos ejectorPos = util.grid.at(4, 1, 2);
    Selection ejectorS = util.select.position(ejectorPos);
    BlockPos targetPos = util.grid.at(0, 1, 2);
    Selection targetS = util.select.position(targetPos);
    scene.world.setBlock(targetPos, AllBlocks.ANDESITE_CASING.getDefaultState(), false);
    scene.idle(5);
    scene.world.showSection(targetS, Direction.DOWN);
    scene.idle(10);
    ItemStack asStack = AllBlocks.WEIGHTED_EJECTOR.asStack();
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(targetPos), Pointing.DOWN).rightClick().whileSneaking().withItem(asStack), 50);
    scene.idle(7);
    Object slot = new Object();
    scene.overlay.chaseBoundingBoxOutline(PonderPalette.OUTPUT, slot, new AABB(targetPos), 160);
    scene.overlay.showText(70).attachKeyFrame().colored(PonderPalette.OUTPUT).text("Sneak and Right-Click holding an Ejector to select its target location").pointAt(util.vector.blockSurface(targetPos, Direction.WEST)).placeNearTarget();
    scene.idle(80);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(ejectorPos), Pointing.DOWN).rightClick().withItem(asStack), 50);
    scene.idle(7);
    scene.world.setKineticSpeed(ejectorS, 0);
    scene.world.modifyTileNBT(ejectorS, EjectorTileEntity.class, nbt -> {
        NBTHelper.writeEnum(nbt, "State", EjectorTileEntity.State.RETRACTING);
        nbt.putFloat("ForceAngle", 1);
    });
    scene.world.showSection(ejectorS, Direction.DOWN);
    scene.idle(10);
    scene.overlay.showText(60).colored(PonderPalette.OUTPUT).text("The placed ejector will now launch objects to the marked location").pointAt(util.vector.blockSurface(ejectorPos, Direction.WEST)).placeNearTarget();
    scene.idle(70);
    slot = new Object();
    AABB bb = new AABB(ejectorPos.west());
    scene.overlay.chaseBoundingBoxOutline(PonderPalette.OUTPUT, slot, bb, 20);
    scene.idle(10);
    scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, slot, bb.expandTowards(-15, 15, 0), 100);
    scene.idle(10);
    scene.overlay.showText(60).attachKeyFrame().colored(PonderPalette.GREEN).text("A valid target can be at any height or distance within range").pointAt(util.vector.blockSurface(targetPos, Direction.WEST)).placeNearTarget();
    scene.idle(70);
    scene.overlay.chaseBoundingBoxOutline(PonderPalette.RED, new Object(), bb.move(-2, 0, -1), 60);
    scene.idle(10);
    scene.overlay.showText(50).colored(PonderPalette.RED).text("They cannot however be off to a side").pointAt(util.vector.blockSurface(targetPos.north().east(), Direction.WEST)).placeNearTarget();
    scene.idle(70);
    scene.overlay.showSelectionWithText(util.select.position(ejectorPos.west()), 70).colored(PonderPalette.OUTPUT).text("If no valid Target was selected, it will simply target the block directly in front").placeNearTarget();
    scene.idle(80);
    scene.world.showSection(util.select.position(3, 0, 5), Direction.UP);
    scene.world.showSection(util.select.fromTo(4, 1, 5, 4, 1, 3), Direction.DOWN);
    scene.idle(12);
    scene.world.setKineticSpeed(ejectorS, 32);
    scene.idle(10);
    scene.overlay.showText(50).attachKeyFrame().text("Supply Rotational Force in order to charge it up").pointAt(util.vector.topOf(4, 1, 3)).placeNearTarget();
    scene.idle(60);
    ItemStack copperBlock = new ItemStack(Items.COPPER_BLOCK);
    ItemStack copperIngot = new ItemStack(Items.COPPER_INGOT);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(ejectorPos).add(0.5, 0, 0), Pointing.RIGHT).withItem(copperBlock), 30);
    scene.idle(7);
    scene.world.createItemOnBeltLike(ejectorPos, Direction.NORTH, copperBlock);
    scene.idle(20);
    scene.overlay.showText(50).text("Items placed on the ejector cause it to trigger").pointAt(util.vector.topOf(ejectorPos)).placeNearTarget();
    scene.idle(60);
    scene.world.modifyEntities(ItemEntity.class, Entity::discard);
    scene.world.hideSection(targetS, Direction.SOUTH);
    scene.idle(15);
    scene.world.restoreBlocks(targetS);
    scene.world.showSection(targetS, Direction.SOUTH);
    scene.idle(10);
    scene.world.createItemOnBeltLike(targetPos, Direction.SOUTH, copperIngot);
    scene.idle(20);
    scene.world.createItemOnBeltLike(ejectorPos, Direction.SOUTH, copperBlock);
    scene.overlay.showText(60).attachKeyFrame().text("If Inventories are targeted, the ejector will wait until there is space").pointAt(util.vector.topOf(targetPos)).placeNearTarget();
    scene.idle(70);
    scene.effects.indicateSuccess(targetPos);
    scene.world.removeItemsFromBelt(targetPos);
    scene.idle(40);
    scene.world.hideSection(targetS, Direction.NORTH);
    scene.idle(15);
    scene.world.setBlock(targetPos, AllBlocks.ANDESITE_CASING.getDefaultState(), false);
    scene.world.showSection(targetS, Direction.NORTH);
    Vec3 input = util.vector.of(4.8, 1 + 12 / 16f, 2.5);
    Vec3 topOfSlot = input.add(0, 2 / 16f, 0);
    scene.overlay.showControls(new InputWindowElement(topOfSlot, Pointing.DOWN).scroll().withWrench(), 60);
    scene.overlay.showFilterSlotInput(input, 80);
    scene.idle(10);
    scene.overlay.showText(80).attachKeyFrame().text("Using the Wrench, a required Stack Size can be configured").pointAt(topOfSlot).placeNearTarget();
    scene.world.modifyTileNBT(ejectorS, EjectorTileEntity.class, nbt -> {
        nbt.putInt("ScrollValue", 10);
    });
    scene.idle(90);
    scene.world.showSection(util.select.fromTo(5, 1, 0, 4, 1, 1), Direction.DOWN);
    scene.world.showSection(util.select.position(5, 0, 1), Direction.UP);
    scene.idle(15);
    BlockPos beltPos = util.grid.at(4, 1, 0);
    scene.world.createItemOnBeltLike(beltPos, Direction.UP, copperBlock);
    scene.overlay.showText(100).text("It is now limited to this stack size, and only activates when its held stack reaches this amount").pointAt(util.vector.topOf(ejectorPos)).placeNearTarget();
    for (int i = 0; i < 4; i++) {
        scene.idle(20);
        scene.world.createItemOnBeltLike(beltPos, Direction.UP, copperBlock);
    }
    scene.idle(20);
    scene.world.createItemOnBeltLike(beltPos, Direction.UP, ItemHandlerHelper.copyStackWithSize(copperBlock, 15));
    scene.idle(80);
    scene.world.hideSection(util.select.fromTo(5, 1, 0, 4, 1, 1), Direction.UP);
    scene.world.hideSection(util.select.position(5, 0, 1), Direction.DOWN);
    scene.idle(30);
    scene.world.modifyEntities(ItemEntity.class, Entity::discard);
    scene.addKeyframe();
    ElementLink<ParrotElement> birb = scene.special.createBirb(util.vector.topOf(ejectorPos).add(0, -3 / 16f, 0), ParrotElement.FlappyPose::new);
    scene.idle(15);
    scene.world.modifyTileEntity(ejectorPos, EjectorTileEntity.class, ejector -> ejector.activateDeferred());
    scene.special.moveParrot(birb, util.vector.of(-2, 3, 0), 5);
    scene.special.rotateParrot(birb, 0, 360 * 2, 0, 21);
    scene.idle(5);
    scene.special.moveParrot(birb, util.vector.of(-1, 0, 0), 3);
    scene.idle(3);
    scene.special.moveParrot(birb, util.vector.of(-0.75, -1, 0), 6);
    scene.idle(6);
    scene.special.moveParrot(birb, util.vector.of(-0.25, -2 + 3 / 16f, 0), 12);
    scene.idle(15);
    scene.special.changeBirbPose(birb, ParrotElement.FaceCursorPose::new);
    scene.overlay.showText(80).text("Other Entities will always trigger an Ejector when stepping on it").pointAt(util.vector.topOf(targetPos)).placeNearTarget();
}
Also used : EjectorTileEntity(com.simibubi.create.content.logistics.block.depot.EjectorTileEntity) Entity(net.minecraft.world.entity.Entity) ItemEntity(net.minecraft.world.entity.item.ItemEntity) 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) ParrotElement(com.simibubi.create.foundation.ponder.element.ParrotElement) ItemStack(net.minecraft.world.item.ItemStack) AABB(net.minecraft.world.phys.AABB)

Aggregations

ParrotElement (com.simibubi.create.foundation.ponder.element.ParrotElement)5 BlockPos (net.minecraft.core.BlockPos)5 Selection (com.simibubi.create.foundation.ponder.Selection)4 InputWindowElement (com.simibubi.create.foundation.ponder.element.InputWindowElement)3 Entity (net.minecraft.world.entity.Entity)3 ItemEntity (net.minecraft.world.entity.item.ItemEntity)3 ItemStack (net.minecraft.world.item.ItemStack)3 Vec3 (net.minecraft.world.phys.Vec3)3 FaceCursorPose (com.simibubi.create.foundation.ponder.element.ParrotElement.FaceCursorPose)2 FlappyPose (com.simibubi.create.foundation.ponder.element.ParrotElement.FlappyPose)2 WorldSectionElement (com.simibubi.create.foundation.ponder.element.WorldSectionElement)2 HarvesterTileEntity (com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity)1 PortableItemInterfaceTileEntity (com.simibubi.create.content.contraptions.components.actors.PortableItemInterfaceTileEntity)1 PortableStorageInterfaceTileEntity (com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceTileEntity)1 MechanicalPressTileEntity (com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity)1 SpoutTileEntity (com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity)1 BeltTileEntity (com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity)1 EjectorTileEntity (com.simibubi.create.content.logistics.block.depot.EjectorTileEntity)1 EntityElement (com.simibubi.create.foundation.ponder.element.EntityElement)1 FacePointOfInterestPose (com.simibubi.create.foundation.ponder.element.ParrotElement.FacePointOfInterestPose)1