Search in sources :

Example 1 with PortableStorageInterfaceTileEntity

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

Aggregations

PortableStorageInterfaceTileEntity (com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceTileEntity)1 Selection (com.simibubi.create.foundation.ponder.Selection)1 WorldSectionElement (com.simibubi.create.foundation.ponder.element.WorldSectionElement)1 BlockPos (net.minecraft.core.BlockPos)1