use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class KineticsScenes method cogwheelsCanBeEncased.
public static void cogwheelsCanBeEncased(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("cogwheel_casing", "Encasing Cogwheels");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
Selection large1 = util.select.position(4, 1, 3);
Selection small1 = util.select.fromTo(3, 1, 2, 3, 2, 2);
Selection small2 = util.select.position(2, 1, 2);
Selection large2 = util.select.fromTo(1, 1, 3, 1, 1, 4);
Selection shaft2 = util.select.position(2, 2, 2);
scene.world.setKineticSpeed(shaft2, 0);
scene.idle(10);
scene.world.showSection(large1, Direction.DOWN);
scene.idle(5);
scene.world.showSection(small1, Direction.DOWN);
scene.world.showSection(small2, Direction.DOWN);
scene.idle(5);
scene.world.showSection(large2, Direction.EAST);
scene.idle(20);
BlockEntry<EncasedCogwheelBlock> andesiteEncased = AllBlocks.ANDESITE_ENCASED_COGWHEEL;
ItemStack andesiteCasingItem = AllBlocks.ANDESITE_CASING.asStack();
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(3, 0, 2), Pointing.UP).rightClick().withItem(andesiteCasingItem), 100);
scene.idle(7);
scene.world.setBlocks(util.select.position(3, 1, 2), andesiteEncased.getDefaultState().setValue(EncasedCogwheelBlock.AXIS, Axis.Y).setValue(EncasedCogwheelBlock.TOP_SHAFT, true), true);
scene.world.setKineticSpeed(util.select.position(3, 1, 2), -32);
scene.idle(15);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(2, 1, 2), Pointing.DOWN).rightClick().withItem(andesiteCasingItem), 30);
scene.idle(7);
scene.world.setBlocks(small2, andesiteEncased.getDefaultState().setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true);
scene.world.setKineticSpeed(small2, 32);
scene.idle(15);
BlockEntry<EncasedCogwheelBlock> brassEncased = AllBlocks.BRASS_ENCASED_LARGE_COGWHEEL;
ItemStack brassCasingItem = AllBlocks.BRASS_CASING.asStack();
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(1, 0, 3), Pointing.UP).rightClick().withItem(brassCasingItem), 60);
scene.idle(7);
scene.world.setBlocks(util.select.position(1, 1, 3), brassEncased.getDefaultState().setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true);
scene.world.setKineticSpeed(util.select.position(1, 1, 3), -16);
scene.idle(10);
scene.overlay.showText(70).placeNearTarget().attachKeyFrame().text("Brass or Andesite Casing can be used to decorate Cogwheels").pointAt(util.vector.topOf(1, 1, 3));
scene.idle(80);
ElementLink<WorldSectionElement> shaftLink = scene.world.showIndependentSection(shaft2, Direction.DOWN);
scene.idle(15);
scene.overlay.showText(90).placeNearTarget().colored(PonderPalette.RED).attachKeyFrame().text("Components added after encasing will not connect to the shaft outputs").pointAt(util.vector.centerOf(2, 2, 2));
scene.idle(90);
scene.world.moveSection(shaftLink, new Vec3(0, .5f, 0), 10);
scene.idle(10);
scene.addKeyframe();
Vec3 wrenchHere = util.vector.topOf(2, 1, 2).add(.25, 0, -.25);
scene.overlay.showControls(new InputWindowElement(wrenchHere, Pointing.RIGHT).rightClick().withWrench(), 25);
scene.idle(7);
scene.world.cycleBlockProperty(util.grid.at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT);
scene.idle(15);
scene.world.moveSection(shaftLink, new Vec3(0, -.5f, 0), 10);
scene.idle(10);
scene.world.setKineticSpeed(shaft2, 32);
scene.effects.rotationDirectionIndicator(util.grid.at(2, 2, 2));
scene.idle(20);
scene.overlay.showText(90).placeNearTarget().colored(PonderPalette.GREEN).text("The Wrench can be used to toggle connections").pointAt(wrenchHere.add(-.5, 0, .5));
scene.idle(40);
scene.overlay.showControls(new InputWindowElement(wrenchHere, Pointing.RIGHT).rightClick().withWrench(), 25);
scene.idle(7);
scene.world.cycleBlockProperty(util.grid.at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT);
scene.world.setKineticSpeed(shaft2, 0);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class KineticsScenes method furnaceEngine.
private static void furnaceEngine(SceneBuilder scene, SceneBuildingUtil util, boolean flywheel) {
scene.title(flywheel ? "flywheel" : "furnace_engine", "Generating Rotational Force using the " + (flywheel ? "Flywheel" : "Furnace Engine"));
scene.configureBasePlate(0, 0, 6);
scene.world.showSection(util.select.layer(0), Direction.UP);
BlockPos furnacePos = util.grid.at(4, 1, 3);
BlockPos cogPos = util.grid.at(1, 1, 2);
BlockPos gaugePos = util.grid.at(1, 1, 1);
scene.idle(5);
Selection furnaceSelect = util.select.position(furnacePos);
scene.world.showSection(furnaceSelect, Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(furnacePos.west()), Direction.DOWN);
scene.idle(10);
scene.world.showSection(util.select.position(furnacePos.west(3)), Direction.EAST);
scene.idle(10);
String text = flywheel ? "Flywheels are required for generating rotational force with the Furnace Engine" : "Furnace Engines generate Rotational Force while their attached Furnace is running";
scene.overlay.showText(80).attachKeyFrame().placeNearTarget().pointAt(util.vector.topOf(furnacePos.west(flywheel ? 3 : 1))).text(text);
scene.idle(90);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(furnacePos), Pointing.DOWN).withItem(new ItemStack(Items.OAK_LOG)), 30);
scene.idle(5);
scene.overlay.showControls(new InputWindowElement(util.vector.blockSurface(furnacePos, Direction.NORTH), Pointing.RIGHT).withItem(new ItemStack(Items.COAL)), 30);
scene.idle(7);
scene.world.cycleBlockProperty(furnacePos, FurnaceBlock.LIT);
scene.effects.emitParticles(util.vector.of(4.5, 1.2, 2.9), Emitter.simple(ParticleTypes.LAVA, Vec3.ZERO), 4, 1);
scene.world.setKineticSpeed(util.select.fromTo(1, 1, 3, 1, 1, 1), 16);
scene.idle(40);
scene.world.showSection(util.select.position(cogPos), Direction.SOUTH);
scene.idle(15);
scene.effects.rotationSpeedIndicator(cogPos);
scene.world.showSection(util.select.position(gaugePos), Direction.SOUTH);
scene.idle(15);
scene.overlay.showText(80).attachKeyFrame().placeNearTarget().colored(PonderPalette.GREEN).pointAt(util.vector.blockSurface(gaugePos, Direction.WEST)).text("The provided Rotational Force has a very large stress capacity");
scene.idle(90);
ElementLink<WorldSectionElement> engine = scene.world.makeSectionIndependent(util.select.fromTo(3, 1, 3, 1, 1, 1));
scene.world.moveSection(engine, util.vector.of(0, 1, 0), 15);
scene.idle(10);
scene.world.hideSection(furnaceSelect, Direction.NORTH);
scene.idle(15);
scene.world.setBlock(furnacePos, Blocks.BLAST_FURNACE.defaultBlockState().setValue(FurnaceBlock.FACING, Direction.NORTH).setValue(FurnaceBlock.LIT, true), false);
scene.world.showSection(furnaceSelect, Direction.NORTH);
scene.idle(10);
scene.world.moveSection(engine, util.vector.of(0, -1, 0), 15);
scene.idle(10);
scene.world.setKineticSpeed(util.select.fromTo(1, 1, 3, 1, 1, 1), 32);
scene.idle(5);
scene.effects.rotationSpeedIndicator(cogPos);
scene.overlay.showText(80).placeNearTarget().colored(PonderPalette.MEDIUM).pointAt(util.vector.topOf(furnacePos.west())).text("Using a Blast Furnace will double the efficiency of the Engine");
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class KineticsScenes method valveHandle.
public static void valveHandle(SceneBuilder scene, SceneBuildingUtil util) {
manualSource(scene, util, false);
scene.world.setKineticSpeed(util.select.everywhere(), 0);
scene.idle(20);
Vec3 centerOf = util.vector.centerOf(2, 2, 2);
scene.overlay.showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick().withItem(new ItemStack(Items.BLUE_DYE)), 40);
scene.idle(7);
scene.world.modifyBlock(util.grid.at(2, 2, 2), s -> AllBlocks.DYED_VALVE_HANDLES.get(DyeColor.BLUE).getDefaultState().setValue(ValveHandleBlock.FACING, Direction.UP), true);
scene.idle(10);
scene.overlay.showText(70).text("Valve handles can be dyed for aesthetic purposes").placeNearTarget().pointAt(centerOf);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class MechanicalSawScenes method contraption.
public static void contraption(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_saw_contraption", "Using Mechanical Saws on Contraptions");
scene.configureBasePlate(1, 0, 6);
scene.scaleSceneView(.9f);
scene.world.setBlock(util.grid.at(2, 0, 3), Blocks.GRASS_BLOCK.defaultBlockState(), false);
scene.world.showSection(util.select.layer(0).add(util.select.position(3, 1, 1)).add(util.select.position(1, 1, 2)).add(util.select.position(2, 1, 4)), Direction.UP);
Selection kinetics = util.select.fromTo(6, 1, 2, 6, 1, 6);
scene.idle(5);
ElementLink<WorldSectionElement> pistonHead = scene.world.showIndependentSection(util.select.fromTo(6, 1, 1, 8, 1, 1), Direction.DOWN);
scene.world.moveSection(pistonHead, util.vector.of(0, 0, 1), 0);
scene.world.showSection(kinetics, Direction.DOWN);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(util.select.fromTo(5, 1, 3, 5, 1, 2), Direction.DOWN);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(4, 1, 3), Direction.EAST, contraption);
scene.idle(5);
scene.world.showSectionAndMerge(util.select.position(4, 1, 2), Direction.EAST, contraption);
scene.idle(5);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.topOf(util.grid.at(4, 1, 3))).text("Whenever Saws are moved as part of an animated Contraption...");
scene.idle(70);
Selection saws = util.select.fromTo(4, 1, 2, 4, 1, 3);
Selection tree = util.select.fromTo(2, 1, 3, 2, 7, 3).add(util.select.layersFrom(3));
scene.world.showSection(tree, Direction.UP);
scene.world.setKineticSpeed(util.select.position(5, 0, 6), -8);
scene.world.setKineticSpeed(kinetics, 16);
scene.world.setKineticSpeed(saws, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
BlockPos breakingPos = util.grid.at(2, 1, 3);
for (int i = 0; i < 10; i++) {
scene.idle(3);
scene.world.incrementBlockBreakingProgress(breakingPos);
if (i == 2) {
scene.overlay.showText(80).placeNearTarget().pointAt(util.vector.blockSurface(breakingPos, Direction.WEST)).text("...they will cut any trees the contraption runs them into");
}
}
scene.world.replaceBlocks(util.select.fromTo(2, 2, 3, 2, 6, 3), Blocks.AIR.defaultBlockState(), true);
scene.world.destroyBlock(util.grid.at(4, 5, 1));
scene.world.destroyBlock(util.grid.at(1, 4, 2));
scene.world.destroyBlock(util.grid.at(3, 6, 2));
scene.world.destroyBlock(util.grid.at(2, 4, 1));
scene.world.destroyBlock(util.grid.at(2, 6, 3));
scene.world.destroyBlock(util.grid.at(2, 5, 2));
scene.world.destroyBlock(util.grid.at(1, 4, 2));
scene.world.replaceBlocks(util.select.layersFrom(4), Blocks.AIR.defaultBlockState(), false);
for (int i = 0; i < 5; i++) {
Vec3 dropPos = util.vector.centerOf(breakingPos.above(i));
float distance = (float) dropPos.distanceTo(util.vector.centerOf(breakingPos));
scene.world.createItemEntity(dropPos, util.vector.of(-distance / 20, 0, 0), new ItemStack(Items.OAK_LOG));
}
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(saws, 0);
scene.idle(20);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.moveSection(pistonHead, util.vector.of(2, 0, 0), 40);
scene.world.moveSection(contraption, util.vector.of(2, 0, 0), 40);
scene.world.hideSection(tree, Direction.UP);
scene.idle(40);
scene.world.restoreBlocks(tree);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
scene.world.glueBlockOnto(util.grid.at(5, 2, 2), Direction.DOWN, contraption);
scene.overlay.showText(60).attachKeyFrame().placeNearTarget().pointAt(util.vector.blockSurface(util.grid.at(5, 2, 2), Direction.WEST)).sharedText("storage_on_contraption");
scene.idle(70);
scene.world.showSection(tree, Direction.DOWN);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.setKineticSpeed(saws, 16);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
for (int i = 0; i < 10; i++) {
scene.idle(3);
scene.world.incrementBlockBreakingProgress(breakingPos);
}
scene.world.replaceBlocks(util.select.fromTo(2, 2, 3, 2, 6, 3), Blocks.AIR.defaultBlockState(), true);
scene.world.destroyBlock(util.grid.at(4, 5, 1));
scene.world.destroyBlock(util.grid.at(1, 4, 2));
scene.world.destroyBlock(util.grid.at(3, 6, 2));
scene.world.destroyBlock(util.grid.at(2, 4, 1));
scene.world.destroyBlock(util.grid.at(2, 6, 3));
scene.world.destroyBlock(util.grid.at(2, 5, 2));
scene.world.destroyBlock(util.grid.at(1, 4, 2));
scene.world.replaceBlocks(util.select.layersFrom(4), Blocks.AIR.defaultBlockState(), false);
scene.world.moveSection(pistonHead, util.vector.of(-1, 0, 0), 20);
scene.world.moveSection(contraption, util.vector.of(-1, 0, 0), 20);
scene.idle(20);
scene.world.setKineticSpeed(saws, 0);
scene.idle(10);
scene.overlay.showControls(new InputWindowElement(util.vector.topOf(3, 2, 2), Pointing.DOWN).withItem(new ItemStack(Blocks.OAK_LOG)), 60);
scene.idle(20);
}
use of com.simibubi.create.foundation.ponder.element.InputWindowElement in project Create by Creators-of-Create.
the class MechanicalSawScenes method processing.
public static void processing(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("mechanical_saw_processing", "Processing Items on the Mechanical Saw");
scene.configureBasePlate(0, 0, 5);
scene.world.showSection(util.select.layer(0), Direction.UP);
BlockPos shaftPos = util.grid.at(2, 1, 3);
scene.world.setBlock(shaftPos, AllBlocks.SHAFT.getDefaultState().setValue(ShaftBlock.AXIS, Axis.Z), false);
BlockPos sawPos = util.grid.at(2, 1, 2);
Selection sawSelect = util.select.position(sawPos);
scene.world.modifyTileNBT(sawSelect, SawTileEntity.class, nbt -> nbt.putInt("RecipeIndex", 0));
scene.idle(5);
scene.world.showSection(util.select.fromTo(2, 1, 3, 2, 1, 5), Direction.DOWN);
scene.idle(10);
scene.effects.rotationDirectionIndicator(shaftPos);
scene.world.showSection(sawSelect, Direction.DOWN);
scene.idle(10);
scene.overlay.showText(50).attachKeyFrame().text("Upward facing Mechanical Saws can process a variety of items").pointAt(util.vector.blockSurface(sawPos, Direction.WEST)).placeNearTarget();
scene.idle(45);
ItemStack log = new ItemStack(Items.OAK_LOG);
ItemStack strippedLog = new ItemStack(Items.STRIPPED_OAK_LOG);
ItemStack planks = new ItemStack(Items.OAK_PLANKS);
Vec3 itemSpawn = util.vector.centerOf(sawPos.above().west());
ElementLink<EntityElement> logItem = scene.world.createItemEntity(itemSpawn, util.vector.of(0, 0, 0), log);
scene.idle(12);
scene.overlay.showControls(new InputWindowElement(itemSpawn, Pointing.DOWN).withItem(log), 20);
scene.idle(10);
scene.world.modifyEntity(logItem, e -> e.setDeltaMovement(util.vector.of(0.05, 0.2, 0)));
scene.idle(12);
scene.world.modifyEntity(logItem, Entity::discard);
scene.world.createItemOnBeltLike(sawPos, Direction.WEST, log);
scene.idle(50);
logItem = scene.world.createItemEntity(util.vector.topOf(sawPos).add(0.5, -.1, 0), util.vector.of(0.05, 0.18, 0), strippedLog);
scene.idle(12);
scene.overlay.showControls(new InputWindowElement(itemSpawn.add(2, 0, 0), Pointing.DOWN).withItem(strippedLog), 20);
scene.idle(30);
scene.overlay.showText(60).attachKeyFrame().text("The processed item always moves against the rotational input to the saw").pointAt(util.vector.blockSurface(sawPos, Direction.UP)).placeNearTarget();
scene.idle(70);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -2 * f);
scene.effects.rotationDirectionIndicator(shaftPos);
scene.world.modifyEntity(logItem, e -> e.setDeltaMovement(util.vector.of(-0.05, 0.2, 0)));
scene.idle(12);
scene.world.modifyEntity(logItem, Entity::discard);
scene.world.createItemOnBeltLike(sawPos, Direction.EAST, strippedLog);
scene.idle(25);
logItem = scene.world.createItemEntity(util.vector.topOf(sawPos).add(-0.5, -.1, 0), util.vector.of(-0.05, 0.18, 0), planks);
scene.idle(22);
Selection otherBelt = util.select.fromTo(3, 1, 3, 4, 1, 2);
Selection belt = util.select.fromTo(0, 1, 2, 1, 1, 3);
scene.world.setKineticSpeed(otherBelt, 0);
scene.world.setKineticSpeed(belt, 0);
scene.world.modifyKineticSpeed(util.select.everywhere(), f -> -f);
scene.world.modifyEntity(logItem, Entity::discard);
scene.world.setBlock(shaftPos, AllBlocks.COGWHEEL.getDefaultState().setValue(ShaftBlock.AXIS, Axis.Z), true);
scene.idle(3);
scene.addKeyframe();
ElementLink<WorldSectionElement> beltSection = scene.world.showIndependentSection(belt, Direction.EAST);
scene.world.moveSection(beltSection, util.vector.of(0, 100, 0), 0);
scene.idle(1);
scene.world.removeItemsFromBelt(util.grid.at(1, 1, 2));
scene.idle(1);
scene.world.setKineticSpeed(belt, -64);
scene.idle(1);
scene.world.moveSection(beltSection, util.vector.of(0, -100, 0), 0);
scene.idle(3);
ElementLink<WorldSectionElement> otherBeltSection = scene.world.showIndependentSection(otherBelt, Direction.WEST);
scene.world.moveSection(otherBeltSection, util.vector.of(0, 100, 0), 0);
scene.idle(1);
scene.world.removeItemsFromBelt(util.grid.at(3, 1, 2));
scene.idle(1);
scene.world.setKineticSpeed(otherBelt, -64);
scene.idle(1);
scene.world.moveSection(otherBeltSection, util.vector.of(0, -100, 0), 0);
scene.idle(3);
ItemStack stone = new ItemStack(Blocks.STONE);
BlockPos firstBelt = util.grid.at(0, 1, 2);
scene.world.createItemOnBelt(firstBelt, Direction.WEST, stone);
scene.overlay.showText(60).text("Saws can work in-line with Mechanical Belts").pointAt(util.vector.blockSurface(firstBelt, Direction.WEST)).placeNearTarget();
scene.idle(60);
scene.rotateCameraY(-90);
scene.idle(20);
Vec3 filter = util.vector.of(2.5, 1 + 13 / 16f, 2.75);
scene.overlay.showFilterSlotInput(filter, 80);
ItemStack bricks = new ItemStack(Blocks.STONE_BRICKS);
scene.overlay.showControls(new InputWindowElement(filter, Pointing.DOWN).withItem(bricks), 80);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
scene.idle(7);
scene.world.setFilterData(util.select.position(sawPos), SawTileEntity.class, bricks);
scene.idle(10);
scene.overlay.showText(80).attachKeyFrame().text("When an ingredient has multiple possible outcomes, the filter slot can specify it").pointAt(filter).placeNearTarget();
scene.idle(90);
scene.rotateCameraY(90);
scene.world.createItemOnBelt(firstBelt, Direction.WEST, stone);
scene.idle(20);
scene.markAsFinished();
scene.overlay.showText(100).text("Without filter, the Saw would cycle through all outcomes instead").colored(PonderPalette.RED).pointAt(filter).placeNearTarget();
scene.idle(65);
scene.world.modifyEntities(ItemEntity.class, Entity::discard);
}
Aggregations