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();
}
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");
}
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);
}
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);
}
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);
}
Aggregations