use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class ChuteScenes method upward.
public static void upward(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("chute_upward", "Transporting Items upward via Chutes");
scene.configureBasePlate(0, 0, 5);
scene.scaleSceneView(.9f);
scene.showBasePlate();
Selection chute = util.select.fromTo(1, 2, 2, 1, 4, 2);
scene.world.setBlocks(chute, Blocks.AIR.defaultBlockState(), false);
scene.world.showSection(util.select.position(1, 1, 2), Direction.UP);
scene.idle(20);
scene.world.restoreBlocks(chute);
scene.world.showSection(chute, Direction.DOWN);
scene.idle(20);
scene.world.setKineticSpeed(util.select.position(1, 1, 2), 0);
Vec3 surface = util.vector.blockSurface(util.grid.at(1, 2, 2), Direction.WEST);
scene.overlay.showText(70).text("Using Encased Fans at the top or bottom, a Chute can move items upward").attachKeyFrame().pointAt(surface).placeNearTarget();
scene.idle(80);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(1, 2, 2), Direction.NORTH), Pointing.RIGHT).withItem(AllItems.GOGGLES.asStack()), 50);
scene.overlay.showText(70).text("Inspecting chutes with Engineers' Goggles reveals information about the movement direction").attachKeyFrame().pointAt(surface).placeNearTarget();
scene.idle(80);
scene.world.showSection(util.select.fromTo(2, 2, 2, 4, 1, 5).add(util.select.position(3, 0, 5)), Direction.DOWN);
ItemStack stack = new ItemStack(Items.COPPER_BLOCK);
scene.world.createItemOnBelt(util.grid.at(4, 1, 2), Direction.EAST, stack);
scene.idle(10);
scene.rotateCameraY(60);
scene.overlay.showText(70).text("On the 'blocked' end, items will have to be inserted/taken from the sides").attachKeyFrame().pointAt(util.vector.centerOf(util.grid.at(3, 1, 2)).add(0, 3 / 16f, 0)).placeNearTarget();
scene.idle(32);
scene.world.flapFunnel(util.grid.at(2, 2, 2), false);
scene.world.removeItemsFromBelt(util.grid.at(2, 1, 2));
scene.world.createItemOnBeltLike(util.grid.at(1, 2, 2), Direction.EAST, stack);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class ChuteScenes method downward.
public static void downward(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("chute", "Transporting Items downward via Chutes");
scene.configureBasePlate(0, 0, 5);
scene.scaleSceneView(.9f);
scene.world.showSection(util.select.layer(0), Direction.UP);
ElementLink<WorldSectionElement> top = scene.world.showIndependentSection(util.select.fromTo(3, 3, 3, 3, 4, 3), Direction.DOWN);
ElementLink<WorldSectionElement> bottom = scene.world.showIndependentSection(util.select.fromTo(3, 2, 3, 3, 1, 3), Direction.DOWN);
scene.world.moveSection(bottom, util.vector.of(-2, 0, -1), 0);
scene.world.moveSection(top, util.vector.of(0, 0, -1), 0);
scene.idle(20);
ItemStack stack = new ItemStack(Items.COPPER_BLOCK);
scene.world.createItemEntity(util.vector.centerOf(util.grid.at(3, 3, 2)), util.vector.of(0, -0.1, 0), stack);
scene.idle(20);
ElementLink<EntityElement> remove = scene.world.createItemEntity(util.vector.centerOf(util.grid.at(1, 5, 2)), util.vector.of(0, 0.1, 0), stack);
scene.idle(15);
scene.world.modifyEntity(remove, Entity::discard);
scene.overlay.showText(60).attachKeyFrame().pointAt(util.vector.topOf(util.grid.at(1, 2, 2))).placeNearTarget().text("Chutes can transport items vertically from and to inventories");
scene.idle(70);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
scene.world.moveSection(bottom, util.vector.of(1, 0, 0), 10);
scene.world.moveSection(top, util.vector.of(-1, 0, 0), 10);
scene.idle(20);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 3, 2), Direction.NORTH), Pointing.RIGHT).rightClick().withWrench(), 40);
scene.idle(7);
scene.world.modifyBlock(util.grid.at(3, 3, 3), s -> s.setValue(ChuteBlock.SHAPE, ChuteBlock.Shape.WINDOW), false);
scene.overlay.showText(50).attachKeyFrame().pointAt(util.vector.blockSurface(util.grid.at(2, 3, 2), Direction.WEST)).placeNearTarget().text("Using the Wrench, a window can be created");
scene.idle(10);
scene.world.modifyBlock(util.grid.at(3, 2, 3), s -> s.setValue(SHAPE, Shape.WINDOW), false);
for (int i = 0; i < 8; i++) {
scene.idle(10);
scene.world.createItemOnBeltLike(util.grid.at(3, 3, 3), Direction.UP, stack);
}
scene.idle(20);
scene.world.hideIndependentSection(bottom, Direction.EAST);
scene.world.hideIndependentSection(top, Direction.EAST);
scene.idle(15);
scene.rotateCameraY(-90);
scene.world.modifyBlock(util.grid.at(2, 2, 1), s -> s.setValue(SHAPE, Shape.NORMAL), false);
scene.world.showSection(util.select.fromTo(2, 1, 1, 2, 2, 1), Direction.DOWN);
scene.idle(30);
ItemStack chuteItem = AllBlocks.CHUTE.asStack();
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 2, 1), Direction.SOUTH), Pointing.LEFT).rightClick().withItem(chuteItem), 30);
scene.idle(7);
scene.world.showSection(util.select.position(2, 3, 2), Direction.NORTH);
scene.world.restoreBlocks(util.select.position(2, 2, 1));
scene.idle(35);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 3, 2), Direction.SOUTH), Pointing.LEFT).rightClick().withItem(chuteItem), 30);
scene.idle(7);
scene.world.showSection(util.select.position(2, 4, 3), Direction.NORTH);
scene.idle(35);
scene.overlay.showText(70).attachKeyFrame().pointAt(util.vector.blockSurface(util.grid.at(2, 4, 3), Direction.WEST)).placeNearTarget().text("Placing chutes targeting the side faces of another will make it diagonal");
scene.idle(15);
scene.rotateCameraY(90);
scene.idle(35);
Direction offset = Direction.NORTH;
for (int i = 0; i < 3; i++) {
remove = scene.world.createItemEntity(util.vector.centerOf(util.grid.at(2, 6, 3).relative(offset)), util.vector.of(0, 0.1, 0).add(Vec3.atLowerCornerOf(offset.getNormal()).scale(-.1)), stack);
scene.idle(12);
scene.world.createItemOnBeltLike(util.grid.at(2, 4, 3), Direction.UP, stack);
scene.world.modifyEntity(remove, Entity::discard);
scene.idle(3);
offset = offset.getClockWise();
}
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 1, 1), Direction.NORTH), Pointing.RIGHT).withItem(stack), 50);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class CrafterScenes method connect.
public static void connect(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_crafter_connect", "Connecting Inventories of Crafters");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 2; x++) {
scene.world.showSection(util.select.position(y == 1 ? x + 1 : 2 - x, y + 1, 2), Direction.DOWN);
scene.idle(2);
}
}
Class<MechanicalCrafterTileEntity> type = MechanicalCrafterTileEntity.class;
BlockPos depotPos = util.grid.at(0, 1, 2);
Selection funnel = util.select.fromTo(4, 1, 5, 4, 1, 2).add(util.select.fromTo(3, 2, 2, 3, 1, 2));
Selection kinetics = util.select.position(3, 3, 2).add(util.select.fromTo(3, 3, 3, 3, 1, 3));
scene.idle(5);
scene.world.showSection(kinetics, Direction.NORTH);
scene.idle(5);
scene.world.showSection(util.select.position(depotPos), Direction.EAST);
scene.idle(10);
scene.world.showSection(funnel, Direction.WEST);
scene.rotateCameraY(60);
ItemStack planks = new ItemStack(Items.OAK_PLANKS);
scene.world.createItemOnBelt(util.grid.at(4, 1, 2), Direction.EAST, planks.copy());
scene.idle(22);
scene.world.modifyTileEntity(util.grid.at(2, 2, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.world.removeItemsFromBelt(util.grid.at(3, 1, 2));
scene.world.flapFunnel(util.grid.at(3, 2, 2), false);
scene.overlay.showSelectionWithText(util.select.position(2, 2, 2), 70).attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.NORTH)).text("Items can be inserted to Crafters automatically");
scene.idle(80);
scene.rotateCameraY(-60 - 90 - 30);
scene.idle(40);
Vec3 v = util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.WEST);
AABB bb = new AABB(v, v).inflate(.125f, .5, .5);
v = v.add(0, 0, .5);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.WHITE, new Object(), bb, 45);
scene.overlay.showControls(new InputWindowElement(v, Pointing.LEFT).rightClick().withWrench(), 40);
scene.idle(7);
scene.world.connectCrafterInvs(util.grid.at(2, 2, 2), util.grid.at(1, 2, 2));
scene.idle(40);
scene.overlay.showSelectionWithText(util.select.fromTo(2, 2, 2, 1, 2, 2), 70).attachKeyFrame().placeNearTarget().pointAt(v).text("Using the Wrench at their backs, Mechanical Crafter inputs can be combined");
scene.idle(80);
scene.overlay.showControls(new InputWindowElement(v.add(0, 1, 0), Pointing.LEFT).rightClick().withWrench(), 20);
scene.idle(7);
scene.world.connectCrafterInvs(util.grid.at(2, 3, 2), util.grid.at(1, 3, 2));
scene.idle(20);
scene.overlay.showControls(new InputWindowElement(v.add(0, -1, 0), Pointing.LEFT).rightClick().withWrench(), 20);
scene.idle(7);
scene.world.connectCrafterInvs(util.grid.at(2, 1, 2), util.grid.at(1, 1, 2));
scene.idle(20);
scene.overlay.showControls(new InputWindowElement(v.add(.5, -.5, 0), Pointing.LEFT).rightClick().withWrench(), 20);
scene.idle(7);
scene.world.connectCrafterInvs(util.grid.at(2, 1, 2), util.grid.at(2, 2, 2));
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(v.add(.5, .5, 0), Pointing.LEFT).rightClick().withWrench(), 20);
scene.idle(7);
scene.world.connectCrafterInvs(util.grid.at(2, 2, 2), util.grid.at(2, 3, 2));
scene.idle(20);
scene.rotateCameraY(90 + 30);
scene.idle(40);
scene.overlay.showSelectionWithText(util.select.fromTo(1, 1, 2, 2, 3, 2), 70).attachKeyFrame().placeNearTarget().text("All connected Crafters can now be accessed by the same input location");
scene.idle(60);
scene.overlay.showControls(new InputWindowElement(util.vector.centerOf(util.grid.at(4, 2, 2)), Pointing.DOWN).withItem(planks), 40);
scene.idle(7);
scene.world.createItemOnBelt(util.grid.at(4, 1, 2), Direction.EAST, ItemHandlerHelper.copyStackWithSize(planks, 16));
scene.idle(22);
scene.world.removeItemsFromBelt(util.grid.at(3, 1, 2));
BlockPos[] positions = new BlockPos[] { util.grid.at(2, 3, 2), util.grid.at(1, 3, 2), util.grid.at(1, 2, 2), util.grid.at(2, 1, 2), util.grid.at(1, 1, 2) };
scene.world.setCraftingResult(util.grid.at(1, 1, 2), new ItemStack(Items.OAK_DOOR, 3));
for (BlockPos pos : positions) {
scene.world.modifyTileEntity(pos, type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(1);
}
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class CrafterScenes method covers.
public static void covers(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_crafter_covers", "Covering slots of Mechanical Crafters");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.world.setBlock(util.grid.at(2, 2, 2), Blocks.AIR.defaultBlockState(), false);
Selection kinetics = util.select.fromTo(3, 1, 2, 3, 1, 5);
scene.world.setKineticSpeed(util.select.fromTo(1, 2, 2, 3, 1, 2), 0);
scene.world.showSection(util.select.position(3, 2, 2), Direction.EAST);
scene.idle(5);
scene.world.showSection(util.select.position(2, 1, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(1, 2, 2), Direction.WEST);
scene.idle(5);
ItemStack iron = new ItemStack(Items.IRON_INGOT);
Class<MechanicalCrafterTileEntity> type = MechanicalCrafterTileEntity.class;
scene.world.modifyTileEntity(util.grid.at(3, 2, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(1, 2, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(5);
Selection emptyCrafter = util.select.position(2, 2, 2);
scene.overlay.showSelectionWithText(emptyCrafter, 90).attachKeyFrame().colored(PonderPalette.RED).text("Some recipes will require additional Crafters to bridge gaps in the path").placeNearTarget();
scene.idle(70);
scene.world.restoreBlocks(emptyCrafter);
scene.world.setCraftingResult(util.grid.at(2, 2, 2), new ItemStack(Items.BUCKET));
scene.world.showSection(emptyCrafter, Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(2, 3, 2), Direction.DOWN);
scene.world.showSection(kinetics, Direction.NORTH);
scene.idle(5);
scene.world.setKineticSpeed(util.select.fromTo(3, 1, 2, 1, 2, 2), -32);
scene.world.setKineticSpeed(util.select.position(3, 1, 2).add(emptyCrafter), 32);
scene.idle(20);
scene.overlay.showText(90).attachKeyFrame().colored(PonderPalette.GREEN).pointAt(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.NORTH)).text("Using Slot Covers, Crafters can be set to act as an Empty Slot in the arrangement").placeNearTarget();
scene.idle(100);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.NORTH).add(0.5, 0, 0), Pointing.RIGHT).withItem(AllItems.CRAFTER_SLOT_COVER.asStack()).rightClick(), 50);
scene.idle(7);
scene.world.modifyTileNBT(emptyCrafter, type, compound -> compound.putBoolean("Cover", true));
scene.idle(130);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 3, 2), Direction.WEST), Pointing.LEFT).withItem(new ItemStack(Items.BUCKET)), 40);
scene.idle(50);
scene.world.showSection(util.select.position(4, 2, 2), Direction.DOWN);
scene.world.connectCrafterInvs(util.grid.at(3, 2, 2), util.grid.at(2, 2, 2));
scene.idle(5);
scene.world.connectCrafterInvs(util.grid.at(2, 1, 2), util.grid.at(2, 2, 2));
scene.idle(5);
scene.world.connectCrafterInvs(util.grid.at(1, 2, 2), util.grid.at(2, 2, 2));
scene.idle(10);
scene.overlay.showSelectionWithText(util.select.fromTo(3, 2, 2, 1, 2, 2).add(util.select.position(2, 1, 2)), 80).attachKeyFrame().pointAt(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.NORTH)).text("Shared Inputs created with the Wrench at the back can also reach across covered Crafters").placeNearTarget();
scene.idle(60);
ElementLink<EntityElement> ingot = scene.world.createItemEntity(util.vector.centerOf(4, 4, 2), util.vector.of(0, 0.2, 0), iron);
scene.idle(17);
scene.world.modifyEntity(ingot, Entity::discard);
scene.world.modifyTileEntity(util.grid.at(3, 2, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
ingot = scene.world.createItemEntity(util.vector.centerOf(4, 4, 2), util.vector.of(0, 0.2, 0), iron);
scene.idle(17);
scene.world.modifyEntity(ingot, Entity::discard);
scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
ingot = scene.world.createItemEntity(util.vector.centerOf(4, 4, 2), util.vector.of(0, 0.2, 0), iron);
scene.idle(17);
scene.world.modifyEntity(ingot, Entity::discard);
scene.world.modifyTileEntity(util.grid.at(1, 2, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class KineticsScenes method manualSource.
private static void manualSource(SceneBuilder scene, SceneBuildingUtil util, boolean handCrank) {
String name = handCrank ? "Hand Cranks" : "Valve Handles";
scene.title(handCrank ? "hand_crank" : "valve_handle", "Generating Rotational Force using " + name);
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
BlockPos gaugePos = util.grid.at(1, 3, 3);
BlockPos handlePos = util.grid.at(2, 2, 2);
Selection handleSelect = util.select.position(handlePos);
scene.world.showSection(util.select.layersFrom(1).substract(handleSelect), Direction.DOWN);
scene.idle(10);
scene.world.showSection(handleSelect, Direction.DOWN);
scene.idle(20);
Vec3 centerOf = util.vector.centerOf(handlePos);
scene.overlay.showText(70).text(name + " can be used by players to apply rotational force manually").placeNearTarget().pointAt(centerOf);
scene.idle(80);
scene.overlay.showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick(), 40);
scene.idle(7);
scene.world.setKineticSpeed(util.select.everywhere(), handCrank ? 32 : 16);
scene.world.modifyKineticSpeed(util.select.column(1, 3), f -> f * -2);
scene.effects.rotationDirectionIndicator(handlePos);
scene.effects.indicateSuccess(gaugePos);
scene.idle(10);
scene.overlay.showText(50).text("Hold Right-Click to rotate it Counter-Clockwise").attachKeyFrame().placeNearTarget().pointAt(centerOf);
scene.idle(70);
scene.overlay.showText(50).colored(handCrank ? PonderPalette.MEDIUM : PonderPalette.SLOW).text("Its conveyed speed is " + (handCrank ? "relatively high" : "slow and precise")).placeNearTarget().pointAt(centerOf);
scene.idle(70);
scene.world.setKineticSpeed(util.select.everywhere(), 0);
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick().whileSneaking(), 40);
scene.idle(7);
scene.world.setKineticSpeed(util.select.everywhere(), handCrank ? -32 : -16);
scene.world.modifyKineticSpeed(util.select.column(1, 3), f -> f * -2);
scene.effects.rotationDirectionIndicator(handlePos);
scene.effects.indicateSuccess(gaugePos);
scene.idle(10);
scene.overlay.showText(90).text("Sneak and Hold Right-Click to rotate it Clockwise").attachKeyFrame().placeNearTarget().pointAt(centerOf);
scene.idle(90);
}
Aggregations