use of com.simibubi.create.foundation.ponder.PonderPalette in project Create by Creators-of-Create.
the class DebugScenes method controlsScene.
public static void controlsScene(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("debug_controls", "Basic player interaction");
scene.showBasePlate();
scene.idle(10);
scene.world.showSection(util.select.layer(1), Direction.DOWN);
scene.idle(4);
scene.world.showSection(util.select.layer(2), Direction.DOWN);
scene.idle(4);
scene.world.showSection(util.select.layer(3), Direction.DOWN);
scene.idle(10);
BlockPos shaftPos = util.grid.at(3, 1, 1);
Selection shaftSelection = util.select.position(shaftPos);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(shaftPos), Pointing.DOWN).rightClick().whileSneaking().withWrench(), 40);
scene.idle(20);
scene.world.replaceBlocks(shaftSelection, AllBlocks.SHAFT.getDefaultState(), true);
scene.idle(20);
scene.world.hideSection(shaftSelection, Direction.UP);
scene.idle(20);
scene.overlay.showControls(new InputWindowElement(util.vector.of(1, 4.5, 3.5), Pointing.LEFT).rightClick().withItem(new ItemStack(Blocks.POLISHED_ANDESITE)), 20);
scene.world.showSection(util.select.layer(4), Direction.DOWN);
scene.idle(40);
BlockPos chassis = util.grid.at(1, 1, 3);
Vec3 chassisSurface = util.vector.blockSurface(chassis, Direction.NORTH);
Object chassisValueBoxHighlight = new Object();
Object chassisEffectHighlight = new Object();
AABB point = new AABB(chassisSurface, chassisSurface);
AABB expanded = point.inflate(1 / 4f, 1 / 4f, 1 / 16f);
Selection singleBlock = util.select.position(1, 2, 3);
Selection twoBlocks = util.select.fromTo(1, 2, 3, 1, 3, 3);
Selection threeBlocks = util.select.fromTo(1, 2, 3, 1, 4, 3);
Selection singleRow = util.select.fromTo(1, 2, 3, 3, 2, 3);
Selection twoRows = util.select.fromTo(1, 2, 3, 3, 3, 3);
Selection threeRows = twoRows.copy().add(threeBlocks);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, chassisValueBoxHighlight, point, 1);
scene.idle(1);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, chassisValueBoxHighlight, expanded, 120);
scene.overlay.showControls(new InputWindowElement(chassisSurface, Pointing.UP).scroll().withWrench(), 40);
PonderPalette white = PonderPalette.WHITE;
scene.overlay.showOutline(white, chassisEffectHighlight, singleBlock, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, twoBlocks, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, threeBlocks, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, twoBlocks, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, singleBlock, 10);
scene.idle(10);
scene.idle(30);
scene.overlay.showControls(new InputWindowElement(chassisSurface, Pointing.UP).whileCTRL().scroll().withWrench(), 40);
scene.overlay.showOutline(white, chassisEffectHighlight, singleRow, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, twoRows, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, threeRows, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, twoRows, 10);
scene.idle(10);
scene.overlay.showOutline(white, chassisEffectHighlight, singleRow, 10);
scene.idle(10);
scene.markAsFinished();
}
Aggregations