Search in sources :

Example 26 with WorldSectionElement

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

the class ProcessingScenes method basin.

public static void basin(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("basin", "Processing Items in the Basin");
    scene.configureBasePlate(0, 0, 5);
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 1, 2), Direction.DOWN);
    scene.idle(10);
    BlockPos basinPos = util.grid.at(1, 2, 2);
    scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.DOWN), false);
    scene.world.showSection(util.select.position(basinPos), Direction.DOWN);
    scene.idle(10);
    Vec3 basinSide = util.vector.blockSurface(basinPos, Direction.WEST);
    scene.overlay.showText(80).attachKeyFrame().text("A Basin can hold Items and Fluids for Processing").pointAt(basinSide).placeNearTarget();
    scene.idle(10);
    ItemStack stack = new ItemStack(Items.BRICK);
    for (int i = 0; i < 4; i++) {
        scene.world.createItemEntity(util.vector.centerOf(basinPos.above(3)), util.vector.of(0, 0, 0), stack);
        scene.idle(10);
    }
    scene.idle(10);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.DOWN).withItem(stack), 30);
    scene.idle(30);
    for (Direction d : Iterate.horizontalDirections) {
        scene.overlay.showOutline(PonderPalette.GREEN, new Object(), util.select.position(basinPos.below().relative(d)), 60);
        scene.idle(4);
    }
    scene.overlay.showText(80).attachKeyFrame().colored(PonderPalette.GREEN).text("After a processing step, basins try to output below to the side of them").pointAt(basinSide).placeNearTarget();
    scene.idle(90);
    ElementLink<WorldSectionElement> depot = scene.world.showIndependentSection(util.select.position(3, 1, 1), Direction.EAST);
    scene.world.moveSection(depot, util.vector.of(-2, 0, 0), 0);
    scene.idle(10);
    scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.NORTH), false);
    scene.idle(10);
    scene.overlay.showText(80).attachKeyFrame().colored(PonderPalette.GREEN).text("When a valid component is present, the Basin will show an output faucet").pointAt(basinSide.add(0.15, 0, -0.5)).placeNearTarget();
    scene.idle(90);
    scene.world.hideIndependentSection(depot, Direction.EAST);
    scene.idle(15);
    depot = scene.world.showIndependentSection(util.select.position(0, 1, 1), Direction.EAST);
    scene.world.moveSection(depot, util.vector.of(1, 0, 0), 0);
    scene.idle(20);
    scene.world.hideIndependentSection(depot, Direction.EAST);
    scene.overlay.showText(80).text("A number of options are applicable here").pointAt(util.vector.centerOf(util.grid.at(1, 1, 1))).placeNearTarget();
    scene.idle(15);
    depot = scene.world.showIndependentSection(util.select.position(1, 1, 0), Direction.EAST);
    scene.world.moveSection(depot, util.vector.of(0, 0, 1), 0);
    scene.idle(20);
    scene.world.hideIndependentSection(depot, Direction.EAST);
    scene.idle(15);
    depot = scene.world.showIndependentSection(util.select.position(1, 1, 1), Direction.EAST);
    scene.idle(20);
    scene.world.hideIndependentSection(depot, Direction.EAST);
    scene.idle(15);
    depot = scene.world.showIndependentSection(util.select.fromTo(3, 1, 0, 2, 1, 0), Direction.EAST);
    scene.world.moveSection(depot, util.vector.of(-2, 0, 1), 0);
    scene.idle(20);
    scene.world.hideIndependentSection(depot, Direction.EAST);
    scene.idle(15);
    depot = scene.world.showIndependentSection(util.select.position(2, 1, 1), Direction.EAST);
    scene.world.moveSection(depot, util.vector.of(-1, 0, 0), 0);
    scene.idle(25);
    BlockPos pressPos = util.grid.at(1, 4, 2);
    scene.world.showSection(util.select.position(pressPos), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(1, 4, 3, 1, 1, 5), Direction.NORTH);
    scene.idle(10);
    Class<MechanicalPressTileEntity> type = MechanicalPressTileEntity.class;
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
    scene.idle(30);
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), stack));
    scene.world.modifyTileNBT(util.select.position(basinPos), BasinTileEntity.class, nbt -> {
        nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, new ItemStack(Blocks.BRICKS))), ia -> ia.getValue().serializeNBT()));
    });
    scene.idle(4);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos.below().north()), Pointing.RIGHT).withItem(new ItemStack(Items.BRICKS)), 30);
    scene.overlay.showText(60).attachKeyFrame().colored(PonderPalette.GREEN).text("Outputs will be caught by the inventory below").pointAt(basinSide.add(0, -1, -1)).placeNearTarget();
    scene.idle(70);
    scene.world.hideIndependentSection(depot, Direction.NORTH);
    scene.idle(10);
    scene.world.modifyBlock(basinPos, s -> s.setValue(BasinBlock.FACING, Direction.DOWN), false);
    scene.idle(20);
    scene.overlay.showText(80).attachKeyFrame().text("Without output faucet, the Basin will retain items created in its processing").pointAt(basinSide).placeNearTarget();
    scene.idle(50);
    ItemStack nugget = AllItems.COPPER_NUGGET.asStack();
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(nugget), 30);
    scene.idle(30);
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
    scene.idle(30);
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), nugget));
    ItemStack ingot = new ItemStack(Items.COPPER_INGOT);
    scene.idle(30);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(ingot), 30);
    scene.idle(30);
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.start(Mode.BASIN));
    scene.idle(30);
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.makeCompactingParticleEffect(util.vector.centerOf(basinPos), ingot));
    ItemStack block = new ItemStack(Items.COPPER_BLOCK);
    scene.idle(30);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basinPos), Pointing.RIGHT).withItem(block), 30);
    scene.overlay.showText(70).attachKeyFrame().colored(PonderPalette.GREEN).text("This can be useful if outputs should be re-used as ingredients").pointAt(basinSide).placeNearTarget();
    scene.idle(80);
    scene.world.showSection(util.select.fromTo(2, 2, 5, 4, 1, 2), Direction.DOWN);
    scene.rotateCameraY(70);
    scene.world.createItemOnBelt(util.grid.at(2, 1, 2), Direction.WEST, block);
    scene.idle(40);
    scene.overlay.showText(70).text("Desired outputs will then have to be extracted from the basin").pointAt(util.vector.topOf(util.grid.at(3, 1, 2)).subtract(0, 3 / 16f, 0)).placeNearTarget();
    scene.idle(80);
    Vec3 filter = util.vector.of(2.5, 2.85, 2.5);
    scene.overlay.showFilterSlotInput(filter, 80);
    scene.overlay.showText(70).text("A Filter might be necessary to avoid pulling out un-processed items").pointAt(filter).placeNearTarget();
    scene.idle(40);
    scene.markAsFinished();
}
Also used : Items(net.minecraft.world.item.Items) SceneBuilder(com.simibubi.create.foundation.ponder.SceneBuilder) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) Direction(net.minecraft.core.Direction) EntityType(net.minecraft.world.entity.EntityType) BasinTileEntity(com.simibubi.create.content.contraptions.processing.BasinTileEntity) Pointing(com.simibubi.create.foundation.utility.Pointing) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) ItemParticleOption(net.minecraft.core.particles.ItemParticleOption) AllItems(com.simibubi.create.AllItems) ElementLink(com.simibubi.create.foundation.ponder.ElementLink) ImmutableList(com.google.common.collect.ImmutableList) BasinBlock(com.simibubi.create.content.contraptions.processing.BasinBlock) PonderPalette(com.simibubi.create.foundation.ponder.PonderPalette) BeltItemElement(com.simibubi.create.foundation.ponder.element.BeltItemElement) DeployerTileEntity(com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity) AllBlocks(com.simibubi.create.AllBlocks) Selection(com.simibubi.create.foundation.ponder.Selection) Iterate(com.simibubi.create.foundation.utility.Iterate) Mode(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode) EntityElement(com.simibubi.create.foundation.ponder.element.EntityElement) Emitter(com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter) Blaze(net.minecraft.world.entity.monster.Blaze) SceneBuildingUtil(com.simibubi.create.foundation.ponder.SceneBuildingUtil) BlazeBurnerBlock(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock) HeatLevel(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel) IntAttached(com.simibubi.create.foundation.utility.IntAttached) Blocks(net.minecraft.world.level.block.Blocks) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement) Entity(net.minecraft.world.entity.Entity) BlockPos(net.minecraft.core.BlockPos) ItemEntity(net.minecraft.world.entity.item.ItemEntity) Vec3(net.minecraft.world.phys.Vec3) LitBlazeBurnerBlock(com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock) NBTHelper(com.simibubi.create.foundation.utility.NBTHelper) ItemStack(net.minecraft.world.item.ItemStack) MillstoneTileEntity(com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity) MechanicalMixerTileEntity(com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity) ParticleTypes(net.minecraft.core.particles.ParticleTypes) 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) Direction(net.minecraft.core.Direction) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity)

Example 27 with WorldSectionElement

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

the class PulleyScenes method attachment.

public static void attachment(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("rope_pulley_attachment", "Moving Pulleys as part of a Contraption");
    scene.configureBasePlate(0, 0, 5);
    scene.scaleSceneView(0.95f);
    scene.setSceneOffsetY(-1);
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(5);
    Selection kinetics = util.select.fromTo(4, 3, 2, 4, 1, 5);
    Selection largeCog = util.select.position(3, 0, 5);
    scene.world.showSection(kinetics, Direction.DOWN);
    ElementLink<WorldSectionElement> poles = scene.world.showIndependentSection(util.select.fromTo(4, 4, 2, 6, 4, 2), Direction.DOWN);
    scene.world.moveSection(poles, util.vector.of(0, -1, 0), 0);
    scene.idle(10);
    BlockPos pulleyPos = util.grid.at(3, 3, 2);
    ElementLink<WorldSectionElement> pulley = scene.world.showIndependentSection(util.select.position(pulleyPos), Direction.EAST);
    scene.idle(10);
    scene.world.showSectionAndMerge(util.select.fromTo(3, 1, 1, 3, 1, 2).add(util.select.position(3, 2, 1)), Direction.SOUTH, pulley);
    scene.idle(10);
    scene.overlay.showText(50).pointAt(util.vector.blockSurface(pulleyPos, Direction.WEST)).placeNearTarget().attachKeyFrame().text("Whenever Pulleys are themselves being moved by a Contraption...");
    scene.idle(60);
    scene.world.setKineticSpeed(largeCog, -16);
    scene.world.setKineticSpeed(kinetics, 32);
    scene.effects.rotationDirectionIndicator(util.grid.at(4, 1, 5));
    scene.world.moveSection(poles, util.vector.of(-2, 0, 0), 40);
    scene.world.moveSection(pulley, util.vector.of(-2, 0, 0), 40);
    scene.idle(40);
    scene.overlay.showSelectionWithText(util.select.fromTo(1, 1, 1, 1, 1, 2), 50).colored(PonderPalette.GREEN).placeNearTarget().attachKeyFrame().text("...its attached structure will be dragged with it");
    scene.idle(60);
    scene.overlay.showText(80).colored(PonderPalette.RED).pointAt(util.vector.topOf(pulleyPos.west(2))).placeNearTarget().text("Mind that pulleys are only movable while stopped");
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement)

Example 28 with WorldSectionElement

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

the class PulleyScenes method movement.

public static void movement(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("rope_pulley", "Moving Structures using Rope Pulleys");
    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());
    scene.world.showSection(util.select.layer(0), Direction.UP);
    ElementLink<WorldSectionElement> plank = scene.world.showIndependentSection(util.select.position(2, 1, 2), 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);
    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.idle(45);
    scene.overlay.showText(60).pointAt(util.vector.blockSurface(pulleyPos, Direction.WEST)).attachKeyFrame().text("Rope Pulleys can move blocks vertically when given Rotational Force").placeNearTarget();
    scene.idle(70);
    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(plank, util.vector.of(0, 2, 0), 40);
    scene.idle(60);
    scene.overlay.showText(60).pointAt(util.vector.blockSurface(pulleyPos, Direction.SOUTH)).text("Direction and Speed of movement depend on the Rotational Input").placeNearTarget();
    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(plank, util.vector.of(0, -2, 0), 40);
    scene.idle(50);
    scene.world.hideIndependentSection(plank, Direction.NORTH);
    scene.idle(15);
    ElementLink<WorldSectionElement> chassis = scene.world.showIndependentSection(util.select.fromTo(2, 1, 1, 0, 2, 1), Direction.SOUTH);
    scene.world.moveSection(chassis, util.vector.of(1, 0, 1), 0);
    scene.idle(5);
    scene.world.showSectionAndMerge(util.select.position(2, 1, 0), Direction.SOUTH, chassis);
    scene.idle(15);
    scene.effects.superGlue(util.grid.at(3, 1, 1), Direction.SOUTH, true);
    scene.overlay.showText(80).pointAt(util.vector.blockSurface(util.grid.at(1, 2, 2), Direction.NORTH)).placeNearTarget().attachKeyFrame().sharedText("movement_anchors");
    scene.idle(90);
    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(chassis, util.vector.of(0, 2, 0), 40);
    scene.idle(50);
    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(chassis, util.vector.of(0, -2, 0), 40);
    scene.idle(50);
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement)

Example 29 with WorldSectionElement

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

the class RedstoneScenes method sticker.

public static void sticker(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("sticker", "Attaching blocks using the Sticker");
    scene.configureBasePlate(0, 0, 5);
    scene.showBasePlate();
    scene.idle(5);
    Selection redstone = util.select.fromTo(0, 2, 2, 2, 2, 2);
    BlockPos stickerPos = util.grid.at(2, 2, 2);
    Selection stickerSelect = util.select.position(stickerPos);
    BlockPos buttonPos = util.grid.at(0, 2, 2);
    BlockPos bearingPos = util.grid.at(2, 1, 2);
    scene.world.showSection(util.select.fromTo(2, 1, 2, 0, 2, 2).substract(stickerSelect), Direction.DOWN);
    scene.idle(10);
    ElementLink<WorldSectionElement> sticker = scene.world.showIndependentSection(stickerSelect, Direction.DOWN);
    scene.idle(10);
    ElementLink<WorldSectionElement> plank = scene.world.showIndependentSection(util.select.position(2, 2, 1), Direction.SOUTH);
    scene.world.configureCenterOfRotation(sticker, util.vector.centerOf(stickerPos));
    scene.world.configureCenterOfRotation(plank, util.vector.centerOf(stickerPos));
    scene.overlay.showText(60).text("Stickers are ideal for Redstone-controlled block attachment").attachKeyFrame().pointAt(util.vector.blockSurface(stickerPos, Direction.WEST)).placeNearTarget();
    scene.idle(70);
    scene.world.toggleRedstonePower(redstone);
    scene.world.modifyBlock(stickerPos, s -> s.setValue(StickerBlock.EXTENDED, true), false);
    scene.effects.indicateRedstone(buttonPos);
    scene.world.modifyTileNBT(stickerSelect, StickerTileEntity.class, nbt -> {
    });
    scene.idle(20);
    scene.world.toggleRedstonePower(redstone);
    scene.idle(20);
    scene.overlay.showText(60).text("Upon receiving a signal, it will toggle its state").pointAt(util.vector.blockSurface(stickerPos, Direction.WEST)).placeNearTarget();
    scene.idle(70);
    scene.world.rotateBearing(bearingPos, 180 * 3, 80);
    scene.world.rotateSection(sticker, 0, 180 * 3, 0, 80);
    scene.world.rotateSection(plank, 0, 180 * 3, 0, 80);
    scene.overlay.showText(70).text("If it is now moved in a contraption, the block will move with it").pointAt(util.vector.topOf(stickerPos)).placeNearTarget();
    scene.idle(90);
    scene.addKeyframe();
    scene.world.toggleRedstonePower(redstone);
    scene.world.modifyBlock(stickerPos, s -> s.setValue(StickerBlock.EXTENDED, false), false);
    scene.effects.indicateRedstone(buttonPos);
    scene.world.modifyTileNBT(stickerSelect, StickerTileEntity.class, nbt -> {
    });
    scene.idle(20);
    scene.world.toggleRedstonePower(redstone);
    scene.idle(20);
    scene.overlay.showText(60).text("Toggled once again, the block is no longer attached").pointAt(util.vector.blockSurface(stickerPos, Direction.WEST)).placeNearTarget();
    scene.idle(70);
    scene.world.rotateBearing(bearingPos, 180 * 3, 80);
    scene.world.rotateSection(sticker, 0, 180 * 3, 0, 80);
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement)

Example 30 with WorldSectionElement

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

the class RedstoneScenes method contact.

public static void contact(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("redstone_contact", "Redstone Contacts");
    scene.configureBasePlate(0, 0, 5);
    scene.showBasePlate();
    scene.idle(5);
    Selection contactAndRedstone = util.select.fromTo(1, 1, 0, 1, 1, 2);
    Selection topContact = util.select.position(1, 2, 2);
    scene.world.toggleRedstonePower(contactAndRedstone);
    scene.world.toggleRedstonePower(topContact);
    scene.world.showSection(contactAndRedstone, Direction.DOWN);
    BlockPos bearingPos = util.grid.at(3, 1, 2);
    scene.idle(25);
    ElementLink<WorldSectionElement> contact = scene.world.showIndependentSection(topContact, Direction.DOWN);
    scene.idle(10);
    scene.world.toggleRedstonePower(topContact);
    scene.world.toggleRedstonePower(contactAndRedstone);
    scene.effects.indicateRedstone(util.grid.at(1, 1, 2));
    scene.idle(10);
    scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.of(1, 2, 2.5)).text("Redstone Contacts facing each other will emit a redstone signal");
    scene.idle(70);
    scene.world.showSection(util.select.position(bearingPos), Direction.DOWN);
    scene.idle(10);
    scene.world.showSectionAndMerge(util.select.fromTo(2, 2, 2, 4, 2, 2), Direction.DOWN, contact);
    scene.idle(10);
    scene.effects.superGlue(util.grid.at(1, 2, 2), Direction.EAST, true);
    scene.world.configureCenterOfRotation(contact, util.vector.centerOf(bearingPos));
    int speed = 2;
    scene.idle(10);
    scene.world.rotateBearing(bearingPos, 10, speed);
    scene.world.rotateSection(contact, 0, 10, 0, speed);
    scene.idle(speed);
    scene.world.toggleRedstonePower(topContact);
    scene.world.toggleRedstonePower(contactAndRedstone);
    scene.effects.indicateRedstone(util.grid.at(1, 1, 2));
    scene.world.rotateBearing(bearingPos, 340, 34 * speed);
    scene.world.rotateSection(contact, 0, 340, 0, 34 * speed);
    scene.addKeyframe();
    scene.idle(34 * speed);
    scene.overlay.showText(100).placeNearTarget().pointAt(util.vector.of(1, 1.5, 2.5)).text("This still applies when one of them is part of a moving Contraption");
    for (int i = 0; i < 5; i++) {
        scene.world.toggleRedstonePower(topContact);
        scene.world.toggleRedstonePower(contactAndRedstone);
        scene.effects.indicateRedstone(util.grid.at(1, 1, 2));
        scene.world.rotateBearing(bearingPos, 20, 2 * speed);
        scene.world.rotateSection(contact, 0, 20, 0, 2 * speed);
        scene.idle(2 * speed);
        scene.world.toggleRedstonePower(topContact);
        scene.world.toggleRedstonePower(contactAndRedstone);
        scene.world.rotateBearing(bearingPos, 340, 34 * speed);
        scene.world.rotateSection(contact, 0, 340, 0, 34 * speed);
        scene.idle(34 * speed);
        if (i == 0)
            scene.markAsFinished();
    }
    scene.world.toggleRedstonePower(topContact);
    scene.world.toggleRedstonePower(contactAndRedstone);
    scene.world.rotateBearing(bearingPos, 10, speed);
    scene.world.rotateSection(contact, 0, 10, 0, speed);
}
Also used : Selection(com.simibubi.create.foundation.ponder.Selection) BlockPos(net.minecraft.core.BlockPos) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement)

Aggregations

WorldSectionElement (com.simibubi.create.foundation.ponder.element.WorldSectionElement)70 BlockPos (net.minecraft.core.BlockPos)64 Selection (com.simibubi.create.foundation.ponder.Selection)60 InputWindowElement (com.simibubi.create.foundation.ponder.element.InputWindowElement)44 Vec3 (net.minecraft.world.phys.Vec3)39 ItemStack (net.minecraft.world.item.ItemStack)34 Entity (net.minecraft.world.entity.Entity)16 Direction (net.minecraft.core.Direction)11 ItemEntity (net.minecraft.world.entity.item.ItemEntity)11 EntityElement (com.simibubi.create.foundation.ponder.element.EntityElement)10 ElementLink (com.simibubi.create.foundation.ponder.ElementLink)9 SceneBuilder (com.simibubi.create.foundation.ponder.SceneBuilder)9 SceneBuildingUtil (com.simibubi.create.foundation.ponder.SceneBuildingUtil)8 AABB (net.minecraft.world.phys.AABB)8 FluidStack (net.minecraftforge.fluids.FluidStack)8 PonderPalette (com.simibubi.create.foundation.ponder.PonderPalette)7 Pointing (com.simibubi.create.foundation.utility.Pointing)6 HarvesterTileEntity (com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity)5 BeltItemElement (com.simibubi.create.foundation.ponder.element.BeltItemElement)5 BlockState (net.minecraft.world.level.block.state.BlockState)5