use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class FluidTankScenes method storage.
public static void storage(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("fluid_tank_storage", "Storing Fluids in Fluid Tanks");
scene.configureBasePlate(0, 0, 5);
scene.showBasePlate();
scene.idle(5);
BlockPos tankPos = util.grid.at(3, 1, 2);
Selection chocolate = util.select.fromTo(1, 5, 0, 0, 8, 1);
Selection tank = util.select.fromTo(3, 1, 2, 3, 2, 2);
Selection largeCog1 = util.select.position(3, 0, 5);
Selection kinetics1 = util.select.fromTo(2, 1, 5, 2, 1, 3).add(util.select.position(2, 2, 4));
Selection largeCog2 = util.select.position(6, 0, 1);
Selection comparatorStuff = util.select.fromTo(2, 1, 1, 2, 1, 0);
Selection pump = util.select.position(1, 1, 3);
BlockPos pumpPos = util.grid.at(1, 1, 3);
Selection spoutstuff = util.select.fromTo(3, 1, 0, 5, 3, 2).substract(tank);
Selection pipe = util.select.fromTo(1, 1, 2, 1, 1, 5).add(util.select.position(1, 0, 5)).add(util.select.position(2, 1, 2));
ElementLink<WorldSectionElement> tankLink = scene.world.showIndependentSection(tank, Direction.NORTH);
scene.world.moveSection(tankLink, util.vector.of(0, 0, -1), 0);
scene.idle(5);
ElementLink<WorldSectionElement> chocLink = scene.world.showIndependentSection(chocolate, Direction.NORTH);
scene.world.moveSection(chocLink, util.vector.of(2, -4, 3), 0);
scene.idle(10);
scene.overlay.showOutline(PonderPalette.GREEN, chocLink, util.select.fromTo(3, 1, 3, 2, 4, 4), 40);
scene.idle(10);
scene.overlay.showLine(PonderPalette.GREEN, util.vector.of(3, 1, 2), util.vector.of(2, 1, 3), 30);
scene.overlay.showLine(PonderPalette.GREEN, util.vector.of(3, 3, 2), util.vector.of(2, 5, 3), 30);
scene.overlay.showLine(PonderPalette.GREEN, util.vector.of(4, 3, 2), util.vector.of(4, 5, 3), 30);
scene.overlay.showOutline(PonderPalette.GREEN, tankLink, util.select.fromTo(3, 1, 1, 3, 2, 1), 40);
scene.idle(10);
scene.overlay.showText(40).text("Fluid Tanks can be used to store large amounts of fluid").attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(3, 2, 1), Direction.WEST));
scene.idle(50);
scene.world.hideIndependentSection(chocLink, Direction.DOWN);
scene.idle(5);
FluidStack content = new FluidStack(AllFluids.CHOCOLATE.get().getSource(), 16000);
scene.world.modifyTileEntity(tankPos, FluidTankTileEntity.class, te -> te.getTankInventory().fill(content, FluidAction.EXECUTE));
scene.idle(25);
scene.world.moveSection(tankLink, util.vector.of(0, 0, 1), 10);
scene.idle(5);
scene.world.setKineticSpeed(pump, 0);
scene.world.showSection(pipe, Direction.EAST);
scene.idle(10);
scene.world.showSection(largeCog1, Direction.UP);
scene.world.showSection(kinetics1, Direction.WEST);
scene.idle(10);
scene.world.setBlock(util.grid.at(1, -1, 5), AllBlocks.FLUID_TANK.getDefaultState(), false);
scene.world.setKineticSpeed(pump, 128);
scene.idle(5);
Selection pumpRedstone = util.select.fromTo(2, 1, 4, 2, 2, 4);
Selection pumpCogs = util.select.fromTo(2, 1, 3, 1, 1, 3);
scene.world.toggleRedstonePower(pumpRedstone);
scene.world.multiplyKineticSpeed(pumpCogs, -1);
scene.world.propagatePipeChange(pumpPos);
scene.effects.rotationDirectionIndicator(pumpPos);
scene.world.modifyTileEntity(util.grid.at(2, 0, 5), FluidTankTileEntity.class, te -> te.getTankInventory().fill(content, FluidAction.EXECUTE));
scene.idle(20);
for (int i = 0; i < 4; i++) {
scene.world.modifyTileEntity(tankPos, FluidTankTileEntity.class, te -> te.getTankInventory().drain(2000, FluidAction.EXECUTE));
scene.idle(5);
}
scene.overlay.showText(60).text("Pipe networks can push and pull fluids from any side").attachKeyFrame().placeNearTarget().pointAt(util.vector.centerOf(1, 1, 2));
scene.idle(40);
scene.world.toggleRedstonePower(pumpRedstone);
scene.world.multiplyKineticSpeed(pumpCogs, -1);
scene.world.propagatePipeChange(pumpPos);
scene.effects.rotationDirectionIndicator(pumpPos);
for (int i = 0; i < 4; i++) {
scene.world.modifyTileEntity(tankPos, FluidTankTileEntity.class, te -> te.getTankInventory().fill(FluidHelper.copyStackWithAmount(content, 2000), FluidAction.EXECUTE));
scene.idle(5);
}
scene.idle(40);
scene.world.hideSection(largeCog1, Direction.DOWN);
scene.world.hideSection(kinetics1, Direction.SOUTH);
scene.world.hideSection(pipe, Direction.WEST);
scene.idle(10);
scene.world.showSection(comparatorStuff, Direction.SOUTH);
scene.idle(5);
scene.world.moveSection(tankLink, util.vector.of(-1, 0, 0), 10);
scene.idle(10);
scene.world.toggleRedstonePower(comparatorStuff);
scene.world.modifyTileNBT(util.select.position(2, 1, 0), NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 15));
scene.overlay.showText(50).text("The contained fluid can be measured by a Comparator").attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(2, 1, 1), Direction.DOWN).add(0, 1 / 8f, 0));
scene.idle(50);
scene.world.hideSection(comparatorStuff, Direction.EAST);
scene.idle(20);
ItemStack bucket = new ItemStack(Items.BUCKET, 1);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.NORTH), Pointing.RIGHT).showing(AllIcons.I_MTD_CLOSE).withItem(bucket), 40);
scene.idle(7);
scene.overlay.showSelectionWithText(util.select.fromTo(2, 1, 2, 2, 2, 2), 70).text("However, in Survival Mode Fluids cannot be added or taken manually").attachKeyFrame().colored(PonderPalette.RED).placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(2, 2, 2), Direction.WEST));
scene.idle(80);
scene.world.modifyTileEntity(util.grid.at(4, 3, 0), SpoutTileEntity.class, te -> te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).ifPresent(ifh -> ifh.fill(content, FluidAction.EXECUTE)));
scene.world.moveSection(tankLink, util.vector.of(0, 0, 1), 7);
scene.world.multiplyKineticSpeed(spoutstuff, -1);
scene.world.multiplyKineticSpeed(largeCog2, -1);
scene.idle(7);
ElementLink<WorldSectionElement> spoutLink = scene.world.showIndependentSection(spoutstuff, Direction.SOUTH);
ElementLink<WorldSectionElement> largeCogLink = scene.world.showIndependentSection(largeCog2, Direction.UP);
scene.world.moveSection(spoutLink, util.vector.of(-1, 0, 1), 0);
scene.world.moveSection(largeCogLink, util.vector.of(-1, 0, 1), 0);
scene.idle(20);
scene.overlay.showOutline(PonderPalette.GREEN, new Object(), util.select.position(2, 1, 1), 50);
scene.idle(5);
scene.overlay.showOutline(PonderPalette.GREEN, new Object(), util.select.position(3, 3, 1), 50);
scene.idle(5);
scene.overlay.showText(80).text("You can use Basins, Item Drains and Spouts to drain or fill fluid containing items").attachKeyFrame().colored(PonderPalette.GREEN).placeNearTarget().pointAt(util.vector.topOf(2, 1, 1));
scene.idle(90);
ItemStack chocBucket = AllFluids.CHOCOLATE.get().getAttributes().getBucket(new FluidStack(FluidHelper.convertToStill(AllFluids.CHOCOLATE.get()), 1000));
scene.world.createItemOnBeltLike(util.grid.at(3, 1, 0), Direction.WEST, chocBucket);
scene.idle(40);
scene.world.modifyTileNBT(util.select.position(util.grid.at(4, 3, 0)), SpoutTileEntity.class, nbt -> nbt.putInt("ProcessingTicks", 20));
scene.idle(20);
scene.world.removeItemsFromBelt(util.grid.at(4, 1, 0));
scene.world.createItemOnBeltLike(util.grid.at(4, 1, 0), Direction.UP, chocBucket);
for (int i = 0; i < 10; i++) {
scene.effects.emitParticles(util.vector.topOf(3, 1, 1).add(0, 1 / 16f, 0), Emitter.simple(FluidFX.getFluidParticle(content), VecHelper.offsetRandomly(Vec3.ZERO, Create.RANDOM, .1f)), 1, 1);
}
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class ChainDriveScenes method chainDriveAsRelay.
public static void chainDriveAsRelay(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("chain_drive", "Relaying rotational force with Chain Drives");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
BlockPos gaugePos = util.grid.at(0, 1, 3);
Selection gauge = util.select.position(gaugePos);
scene.world.showSection(gauge, Direction.UP);
scene.world.setKineticSpeed(gauge, 0);
scene.idle(5);
scene.world.showSection(util.select.fromTo(5, 1, 2, 4, 1, 2), Direction.DOWN);
scene.idle(10);
for (int i = 0; i < 3; i++) {
scene.idle(5);
scene.world.showSection(util.select.position(3, 1, 2 - i), Direction.DOWN);
if (i != 0)
scene.world.showSection(util.select.position(3, 1, 2 + i), Direction.DOWN);
}
scene.idle(10);
scene.world.showSection(util.select.position(gaugePos.east(2)), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(gaugePos.east()), Direction.DOWN);
scene.idle(5);
scene.world.setKineticSpeed(gauge, 64);
scene.effects.indicateSuccess(gaugePos);
scene.idle(20);
scene.overlay.showText(60).text("Chain Drives relay rotation to each other in a row").attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(3, 1, 4), Direction.WEST));
scene.idle(60);
Selection shafts = util.select.fromTo(2, 1, 0, 2, 1, 1);
BlockPos rotatedECD = util.grid.at(3, 1, 0);
Selection verticalShaft = util.select.fromTo(rotatedECD.above(), rotatedECD.above(2));
scene.world.showSection(shafts, Direction.EAST);
scene.idle(10);
scene.effects.rotationDirectionIndicator(util.grid.at(2, 1, 0));
scene.effects.rotationDirectionIndicator(util.grid.at(2, 1, 1));
scene.idle(20);
scene.overlay.showText(60).text("All shafts connected like this will rotate in the same direction").attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(2, 1, 1), Direction.WEST));
scene.idle(50);
scene.world.hideSection(shafts, Direction.WEST);
scene.idle(25);
scene.addKeyframe();
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(rotatedECD), Pointing.DOWN).rightClick().withWrench(), 30);
scene.idle(7);
scene.world.modifyBlock(rotatedECD, s -> s.setValue(EncasedBeltBlock.AXIS, Axis.Y), true);
scene.idle(40);
scene.world.showSection(verticalShaft, Direction.DOWN);
scene.idle(10);
scene.effects.rotationDirectionIndicator(util.grid.at(3, 3, 0));
scene.idle(10);
scene.overlay.showText(60).text("Any part of the row can be rotated by 90 degrees").placeNearTarget().pointAt(util.vector.centerOf(3, 2, 0));
scene.markAsFinished();
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class ChuteScenes method smart.
public static void smart(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("smart_chute", "Filtering Items using Smart Chutes");
scene.configureBasePlate(0, 0, 5);
scene.scaleSceneView(.9f);
Selection lever = util.select.fromTo(0, 1, 2, 1, 3, 2);
BlockPos smarty = util.grid.at(2, 3, 2);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
scene.world.showSection(util.select.fromTo(2, 1, 2, 2, 2, 2), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(2, 3, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSection(util.select.position(2, 4, 2), Direction.DOWN);
scene.overlay.showText(60).text("Smart Chutes are vertical chutes with additional control").attachKeyFrame().pointAt(util.vector.blockSurface(smarty, Direction.WEST)).placeNearTarget();
scene.idle(70);
Vec3 filter = util.vector.blockSurface(smarty, Direction.NORTH).add(0, 0.25, 0);
scene.overlay.showFilterSlotInput(filter, 60);
ItemStack copper = new ItemStack(Items.IRON_INGOT);
scene.overlay.showControls(new InputWindowElement(filter, Pointing.DOWN).rightClick().withItem(copper), 40);
scene.idle(7);
scene.world.setFilterData(util.select.position(smarty), SmartChuteTileEntity.class, copper);
scene.idle(10);
scene.rotateCameraY(20);
scene.overlay.showText(60).text("Items in the filter slot specify what exactly they can extract and transfer").attachKeyFrame().pointAt(filter).placeNearTarget();
scene.idle(10);
for (int i = 0; i < 18; i++) {
scene.idle(10);
scene.world.createItemOnBeltLike(util.grid.at(2, 2, 2), Direction.UP, copper);
if (i == 8) {
scene.rotateCameraY(-20);
scene.overlay.showControls(new InputWindowElement(filter, Pointing.DOWN).scroll(), 40);
scene.overlay.showText(50).text("Use the Mouse Wheel to specify the extracted stack size").attachKeyFrame().pointAt(filter).placeNearTarget();
}
if (i == 13)
scene.world.showSection(lever, Direction.NORTH);
}
scene.world.toggleRedstonePower(lever.add(util.select.position(smarty)));
scene.effects.indicateRedstone(util.grid.at(0, 3, 2));
scene.overlay.showText(50).text("Redstone power will prevent Smart Chutes from acting.").attachKeyFrame().colored(PonderPalette.RED).pointAt(util.vector.blockSurface(util.grid.at(0, 2, 2), Direction.UP)).placeNearTarget();
scene.idle(70);
scene.world.toggleRedstonePower(lever.add(util.select.position(smarty)));
scene.markAsFinished();
for (int i = 0; i < 8; i++) {
scene.idle(10);
scene.world.createItemOnBeltLike(util.grid.at(2, 2, 2), Direction.UP, copper);
}
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class CrafterScenes method setup.
public static void setup(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_crafter", "Setting up Mechanical Crafters");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> 1.5f * f);
Selection redstone = util.select.fromTo(3, 1, 0, 3, 1, 1);
Selection kinetics = util.select.fromTo(4, 1, 2, 4, 1, 5);
BlockPos depotPos = util.grid.at(0, 1, 2);
Selection crafters = util.select.fromTo(1, 1, 2, 3, 3, 2);
scene.world.modifyBlocks(crafters, s -> s.setValue(MechanicalCrafterBlock.POINTING, Pointing.DOWN), false);
scene.world.setKineticSpeed(crafters, 0);
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
scene.world.showSection(util.select.position(y == 1 ? x + 1 : 3 - x, y + 1, 2), Direction.DOWN);
scene.idle(2);
}
}
scene.overlay.showText(70).text("An array of Mechanical Crafters can be used to automate any Crafting Recipe").pointAt(util.vector.blockSurface(util.grid.at(1, 2, 2), Direction.WEST)).attachKeyFrame().placeNearTarget();
scene.idle(80);
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.cycleBlockProperty(util.grid.at(2, 3, 2), MechanicalCrafterBlock.POINTING);
scene.idle(10);
scene.overlay.showText(50).text("Using a Wrench, the Crafters' paths can be arranged").pointAt(util.vector.blockSurface(util.grid.at(2, 3, 2), Direction.NORTH)).attachKeyFrame().placeNearTarget();
scene.idle(60);
BlockPos[] positions = new BlockPos[] { util.grid.at(3, 1, 2), util.grid.at(2, 1, 2), util.grid.at(1, 1, 2) };
for (BlockPos pos : positions) {
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(pos, Direction.NORTH), Pointing.RIGHT).rightClick().withWrench(), 10);
scene.idle(7);
scene.world.cycleBlockProperty(pos, MechanicalCrafterBlock.POINTING);
scene.idle(15);
}
scene.overlay.showText(100).text("For a valid setup, all paths have to converge into one exit at any side").pointAt(util.vector.blockSurface(util.grid.at(1, 1, 2), Direction.WEST).add(0, 0, -.5f)).colored(PonderPalette.GREEN).attachKeyFrame().placeNearTarget();
scene.idle(60);
Collection<Couple<BlockPos>> couples = ImmutableList.of(Couple.create(util.grid.at(3, 3, 2), util.grid.at(3, 2, 2)), Couple.create(util.grid.at(3, 2, 2), util.grid.at(3, 1, 2)), Couple.create(util.grid.at(2, 3, 2), util.grid.at(1, 3, 2)), Couple.create(util.grid.at(3, 1, 2), util.grid.at(2, 1, 2)), Couple.create(util.grid.at(1, 3, 2), util.grid.at(1, 2, 2)), Couple.create(util.grid.at(2, 2, 2), util.grid.at(2, 1, 2)), Couple.create(util.grid.at(1, 2, 2), util.grid.at(1, 1, 2)), Couple.create(util.grid.at(2, 1, 2), util.grid.at(1, 1, 2)), Couple.create(util.grid.at(1, 1, 2), util.grid.at(0, 1, 2)));
for (Couple<BlockPos> c : couples) {
scene.idle(5);
Vec3 p1 = util.vector.blockSurface(c.getFirst(), Direction.NORTH).add(0, 0, -0.125);
Vec3 p2 = util.vector.blockSurface(c.getSecond(), Direction.NORTH).add(0, 0, -0.125);
AABB point = new AABB(p1, p1);
AABB line = new AABB(p1, p2);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, p1, point, 2);
scene.idle(1);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, p1, line, 30);
}
scene.world.showSection(util.select.position(depotPos), Direction.EAST);
scene.idle(20);
scene.overlay.showText(60).text("The outputs will be placed into the inventory at the exit").pointAt(util.vector.blockSurface(util.grid.at(0, 1, 2), Direction.NORTH)).placeNearTarget();
scene.idle(70);
scene.rotateCameraY(60);
scene.idle(20);
scene.world.showSection(kinetics, Direction.NORTH);
scene.overlay.showText(60).text("Mechanical Crafters require Rotational Force to operate").pointAt(util.vector.blockSurface(util.grid.at(4, 1, 2), Direction.NORTH)).attachKeyFrame().placeNearTarget();
scene.idle(8);
scene.world.setKineticSpeed(crafters, -48);
scene.world.multiplyKineticSpeed(util.select.position(3, 2, 2).add(util.select.position(2, 3, 2)).add(util.select.position(1, 2, 2)).add(util.select.position(2, 1, 2)), -1);
scene.idle(55);
scene.rotateCameraY(-60);
scene.idle(40);
ItemStack planks = new ItemStack(Items.OAK_PLANKS);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(util.grid.at(1, 3, 2), Direction.NORTH), Pointing.RIGHT).rightClick().withItem(planks), 40);
scene.idle(7);
Class<MechanicalCrafterTileEntity> type = MechanicalCrafterTileEntity.class;
scene.world.modifyTileEntity(util.grid.at(1, 3, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(10);
scene.overlay.showText(50).text("Right-Click the front to insert Items manually").pointAt(util.vector.blockSurface(util.grid.at(1, 3, 2), Direction.NORTH)).attachKeyFrame().placeNearTarget();
scene.idle(60);
ItemStack alloy = AllItems.ANDESITE_ALLOY.asStack();
ItemStack log = new ItemStack(Items.OAK_LOG);
scene.world.setCraftingResult(util.grid.at(1, 1, 2), AllBlocks.ANDESITE_CASING.asStack(4));
scene.world.modifyTileEntity(util.grid.at(2, 3, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(3, 3, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(3, 2, 2), type, mct -> mct.getInventory().insertItem(0, alloy.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(2, 2, 2), type, mct -> mct.getInventory().insertItem(0, log.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(1, 2, 2), type, mct -> mct.getInventory().insertItem(0, alloy.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(1, 1, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(3, 1, 2), type, mct -> mct.getInventory().insertItem(0, planks.copy(), false));
scene.overlay.showText(80).attachKeyFrame().text("Once every slot of a path contains an Item, the crafting process will begin").pointAt(util.vector.blockSurface(util.grid.at(1, 3, 2), Direction.WEST)).placeNearTarget();
scene.idle(180);
scene.world.removeItemsFromBelt(depotPos);
ItemStack stick = new ItemStack(Items.STICK);
ItemStack iron = new ItemStack(Items.IRON_INGOT);
scene.world.setCraftingResult(util.grid.at(1, 1, 2), new ItemStack(Items.IRON_PICKAXE));
scene.world.modifyTileEntity(util.grid.at(1, 3, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(2);
scene.world.modifyTileEntity(util.grid.at(2, 3, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(2);
scene.world.modifyTileEntity(util.grid.at(3, 3, 2), type, mct -> mct.getInventory().insertItem(0, iron.copy(), false));
scene.idle(2);
scene.world.modifyTileEntity(util.grid.at(2, 2, 2), type, mct -> mct.getInventory().insertItem(0, stick.copy(), false));
scene.idle(2);
scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory().insertItem(0, stick.copy(), false));
scene.world.showSection(redstone, Direction.SOUTH);
scene.idle(10);
scene.overlay.showText(90).attachKeyFrame().colored(PonderPalette.RED).text("For recipes not fully occupying the crafter setup, the start can be forced using a Redstone Pulse").pointAt(util.vector.blockSurface(util.grid.at(1, 2, 2), Direction.NORTH)).placeNearTarget();
scene.idle(100);
scene.effects.indicateRedstone(util.grid.at(3, 1, 0));
scene.world.toggleRedstonePower(redstone);
scene.idle(20);
scene.world.toggleRedstonePower(redstone);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class FunnelScenes method brass.
public static void brass(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("brass_funnel", "The Brass Funnel");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
BlockPos firstDepot = util.grid.at(3, 1, 1);
BlockPos secondDepot = util.grid.at(1, 1, 1);
Selection depots = util.select.fromTo(firstDepot, secondDepot);
Selection beltAndStuff = util.select.fromTo(0, 1, 2, 4, 1, 2).add(util.select.fromTo(0, 1, 3, 0, 2, 5));
Selection withoutBelt = util.select.layersFrom(1).substract(beltAndStuff).substract(depots);
scene.world.showSection(withoutBelt, Direction.DOWN);
ElementLink<WorldSectionElement> independentSection = scene.world.showIndependentSection(depots, Direction.DOWN);
scene.world.moveSection(independentSection, util.vector.of(0, 0, 1), 0);
BlockPos andesiteFunnel = util.grid.at(3, 2, 2);
BlockPos brassFunnel = util.grid.at(1, 2, 2);
ItemStack itemStack = AllItems.BRASS_INGOT.asStack();
scene.idle(10);
scene.overlay.showText(60).text("Andesite Funnels can only ever extract single items.").attachKeyFrame().pointAt(util.vector.topOf(andesiteFunnel)).placeNearTarget();
scene.idle(10);
scene.world.createItemOnBeltLike(andesiteFunnel.below().north(), Direction.SOUTH, itemStack);
scene.world.flapFunnel(andesiteFunnel, true);
scene.idle(60);
scene.overlay.showText(60).text("Brass Funnels can extract up to a full stack.").attachKeyFrame().pointAt(util.vector.topOf(brassFunnel)).placeNearTarget();
scene.idle(10);
scene.world.createItemOnBeltLike(brassFunnel.below().north(), Direction.SOUTH, ItemHandlerHelper.copyStackWithSize(itemStack, 64));
scene.world.flapFunnel(brassFunnel, true);
scene.idle(60);
AABB filterSlot = new AABB(brassFunnel).inflate(-.35, -.35, -.35).move(0, 0.2, 0);
scene.overlay.chaseBoundingBoxOutline(PonderPalette.WHITE, filterSlot, filterSlot, 80);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(brassFunnel), Pointing.DOWN).scroll(), 60);
scene.idle(10);
scene.overlay.showText(80).text("Scrolling on the filter slot allows for precise control over the extracted stack size.").attachKeyFrame().pointAt(filterSlot.getCenter()).placeNearTarget();
scene.idle(90);
// belt
scene.world.hideIndependentSection(independentSection, Direction.NORTH);
scene.world.hideSection(util.select.position(brassFunnel), Direction.UP);
scene.idle(20);
scene.world.modifyBlock(brassFunnel, s -> s.cycle(BeltFunnelBlock.SHAPE), false);
scene.world.showSection(util.select.position(brassFunnel), Direction.DOWN);
scene.world.showSection(beltAndStuff, Direction.SOUTH);
scene.idle(10);
ItemStack dirt = new ItemStack(Items.DIRT);
ItemStack gravel = new ItemStack(Items.GRAVEL);
ItemStack emerald = new ItemStack(Items.EMERALD);
for (int i = 0; i < 14; i++) {
if (i < 12)
scene.world.createItemOnBelt(andesiteFunnel.below(), Direction.SOUTH, i % 3 == 0 ? dirt : i % 3 == 1 ? gravel : emerald);
scene.idle(10);
if (i > 0 && (i < 3 || i % 3 == 0)) {
scene.world.removeItemsFromBelt(brassFunnel.below());
scene.world.flapFunnel(brassFunnel, false);
}
scene.world.modifyEntities(ItemEntity.class, e -> {
if (e.getY() < 1)
e.discard();
});
if (i == 2) {
scene.overlay.chaseBoundingBoxOutline(PonderPalette.WHITE, filterSlot, filterSlot, 80);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(brassFunnel), Pointing.DOWN).rightClick().withItem(emerald), 60);
scene.idle(10);
scene.overlay.showText(80).text("Using items on the filter slot will restrict the funnel to only transfer matching stacks.").attachKeyFrame().pointAt(filterSlot.getCenter()).placeNearTarget();
scene.world.setFilterData(util.select.position(brassFunnel), FunnelTileEntity.class, emerald);
} else
scene.idle(10);
if (i == 8)
scene.markAsFinished();
}
}
Aggregations