Search in sources :

Example 1 with InputWindowElement

use of com.simibubi.create.foundation.ponder.elements.InputWindowElement in project SteamPowered by TeamMoegMC.

the class SPScenes method steamBoiler.

public static void steamBoiler(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("boiler", "Generating Steam through Boilers and Burning Chambers");
    scene.configureBasePlate(0, 0, 6);
    BlockPos burner = util.grid.at(2, 1, 2);
    BlockPos boiler = util.grid.at(2, 2, 2);
    BlockPos engine = util.grid.at(0, 2, 2);
    BlockPos steamPump = util.grid.at(1, 2, 2);
    BlockPos steamCog1 = util.grid.at(1, 3, 3);
    BlockPos steamCog2 = util.grid.at(0, 3, 3);
    BlockPos waterPump = util.grid.at(4, 3, 2);
    BlockPos waterCog1 = util.grid.at(4, 2, 1);
    BlockPos waterCog2 = util.grid.at(5, 2, 1);
    // show the whole structure
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(10);
    scene.world.showSection(util.select.layers(1, 3), Direction.NORTH);
    scene.idle(50);
    // water pumps
    scene.world.setKineticSpeed(util.select.position(waterPump), 32.0F);
    scene.world.setKineticSpeed(util.select.position(waterCog1), 16.0F);
    scene.world.setKineticSpeed(util.select.position(waterCog2), 16.0F);
    scene.idle(30);
    // boiler text
    scene.overlay.showText(50).attachKeyFrame().text("The Boiler needs water to produce Steam").placeNearTarget().pointAt(util.vector.centerOf(boiler));
    scene.idle(100);
    // burner text
    scene.overlay.showText(100).attachKeyFrame().text("The Burning Chamber needs furnace fuel to heat the Boiler").placeNearTarget().pointAt(util.vector.centerOf(burner));
    scene.idle(100);
    scene.overlay.showText(80).attachKeyFrame().text("Right click with fuel item such as Coal or Planks to provide it with fuel").placeNearTarget().pointAt(util.vector.centerOf(burner));
    scene.idle(100);
    // add fuel
    scene.overlay.showControls(new InputWindowElement(util.vector.centerOf(burner), Pointing.UP).rightClick().withItem(new ItemStack(Items.COAL)), 30);
    scene.idle(40);
    scene.overlay.showControls(new InputWindowElement(util.vector.centerOf(burner), Pointing.UP).rightClick().withItem(new ItemStack(Items.OAK_PLANKS)), 30);
    scene.idle(40);
    scene.world.modifyBlock(burner, s -> s.setValue(BurnerBlock.LIT, true), false);
    scene.idle(20);
    scene.overlay.showText(80).attachKeyFrame().text("Right click with empty hand to take out the remaining fuel").placeNearTarget().pointAt(util.vector.centerOf(burner));
    scene.idle(100);
    // steam pumps
    scene.world.setKineticSpeed(util.select.position(steamPump), 64.0F);
    scene.world.setKineticSpeed(util.select.position(steamCog1), 32.0F);
    scene.world.setKineticSpeed(util.select.position(steamCog2), 32.0F);
    scene.world.modifyBlock(engine, s -> s.setValue(SteamEngineBlock.LIT, true), false);
    scene.idle(50);
    // engine text
    scene.overlay.showText(100).attachKeyFrame().text("Pump the Steam out of the boiler to power the Steam Engines").placeNearTarget().pointAt(util.vector.centerOf(engine));
    scene.idle(100);
}
Also used : InputWindowElement(com.simibubi.create.foundation.ponder.elements.InputWindowElement) BlockPos(net.minecraft.util.math.BlockPos) ItemStack(net.minecraft.item.ItemStack)

Example 2 with InputWindowElement

use of com.simibubi.create.foundation.ponder.elements.InputWindowElement in project FrostedHeart by TeamMoegMC.

the class MixinProcessingScenes method pressing.

/**
 * @author khjxiaogu
 * @reason change mechanical press scene to fit TWR
 */
@Overwrite(remap = false)
public static void pressing(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("mechanical_press", "Processing Items with the Mechanical Press");
    scene.configureBasePlate(0, 0, 5);
    scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.ANDESITE_CASING.getDefaultState(), false);
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(1, 4, 3, 1, 1, 5), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 1, 2), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 2, 2), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 4, 2), Direction.SOUTH);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(3, 1, 1, 1, 1, 1), Direction.SOUTH);
    scene.world.showSection(util.select.fromTo(3, 1, 5, 3, 1, 2), Direction.SOUTH);
    scene.idle(20);
    BlockPos basin = util.grid.at(1, 2, 2);
    BlockPos pressPos = util.grid.at(1, 4, 2);
    Vector3d basinSide = util.vector.blockSurface(basin, Direction.WEST);
    ItemStack copper = AllItems.COPPER_INGOT.asStack();
    ItemStack copperBlock = AllItems.COPPER_SHEET.asStack();
    scene.overlay.showText(60).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Pressing items held in a Basin will cause them to be Compacted");
    scene.idle(40);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.DOWN).withItem(copper), 30);
    scene.idle(30);
    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(basin), copper));
    scene.world.modifyTileNBT(util.select.position(basin), BasinTileEntity.class, nbt -> {
        nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, copperBlock)), ia -> ia.getValue().serializeNBT()));
    });
    scene.idle(4);
    scene.world.createItemOnBelt(util.grid.at(1, 1, 1), Direction.UP, copperBlock);
    scene.idle(30);
    scene.overlay.showText(80).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Compacting includes any filled 2x2 or 3x3 Crafting Recipe, plus a couple extra ones");
    scene.idle(30);
    ItemStack log = new ItemStack(Items.OAK_LOG);
    ItemStack bark = new ItemStack(Items.OAK_WOOD);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.DOWN).withItem(log), 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(basin), log));
    scene.world.modifyTileNBT(util.select.position(basin), BasinTileEntity.class, nbt -> {
        nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, bark)), ia -> ia.getValue().serializeNBT()));
    });
    scene.idle(4);
    scene.world.createItemOnBelt(util.grid.at(1, 1, 1), Direction.UP, bark);
    scene.idle(30);
    scene.rotateCameraY(-30);
    scene.idle(10);
    scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.BLAZE_BURNER.getDefaultState().with(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), true);
    scene.idle(10);
    scene.overlay.showText(80).pointAt(basinSide.subtract(0, 1, 0)).placeNearTarget().text("Some of those recipes may require the heat of a Blaze Burner");
    scene.idle(40);
    scene.rotateCameraY(30);
    scene.idle(60);
    Vector3d filterPos = util.vector.of(1, 2.75f, 2.5f);
    scene.overlay.showFilterSlotInput(filterPos, 100);
    scene.overlay.showText(120).pointAt(filterPos).placeNearTarget().attachKeyFrame().text("The filter slot can be used in case two recipes are conflicting.");
    scene.idle(60);
}
Also used : Mode(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode) SceneBuilder(com.simibubi.create.foundation.ponder.SceneBuilder) BasinTileEntity(com.simibubi.create.content.contraptions.processing.BasinTileEntity) SceneBuildingUtil(com.simibubi.create.foundation.ponder.SceneBuildingUtil) Pointing(com.simibubi.create.foundation.utility.Pointing) BlockPos(net.minecraft.util.math.BlockPos) Overwrite(org.spongepowered.asm.mixin.Overwrite) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) BlazeBurnerBlock(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock) Items(net.minecraft.item.Items) Direction(net.minecraft.util.Direction) AllItems(com.simibubi.create.AllItems) HeatLevel(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel) IntAttached(com.simibubi.create.foundation.utility.IntAttached) ItemStack(net.minecraft.item.ItemStack) Vector3d(net.minecraft.util.math.vector.Vector3d) ImmutableList(com.google.common.collect.ImmutableList) Mixin(org.spongepowered.asm.mixin.Mixin) ProcessingScenes(com.simibubi.create.foundation.ponder.content.ProcessingScenes) NBTHelper(com.simibubi.create.foundation.utility.NBTHelper) InputWindowElement(com.simibubi.create.foundation.ponder.elements.InputWindowElement) AllBlocks(com.simibubi.create.AllBlocks) Vector3d(net.minecraft.util.math.vector.Vector3d) InputWindowElement(com.simibubi.create.foundation.ponder.elements.InputWindowElement) BlockPos(net.minecraft.util.math.BlockPos) ItemStack(net.minecraft.item.ItemStack) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) Overwrite(org.spongepowered.asm.mixin.Overwrite)

Aggregations

InputWindowElement (com.simibubi.create.foundation.ponder.elements.InputWindowElement)2 ItemStack (net.minecraft.item.ItemStack)2 BlockPos (net.minecraft.util.math.BlockPos)2 ImmutableList (com.google.common.collect.ImmutableList)1 AllBlocks (com.simibubi.create.AllBlocks)1 AllItems (com.simibubi.create.AllItems)1 MechanicalPressTileEntity (com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity)1 Mode (com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode)1 BasinTileEntity (com.simibubi.create.content.contraptions.processing.BasinTileEntity)1 BlazeBurnerBlock (com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock)1 HeatLevel (com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel)1 SceneBuilder (com.simibubi.create.foundation.ponder.SceneBuilder)1 SceneBuildingUtil (com.simibubi.create.foundation.ponder.SceneBuildingUtil)1 ProcessingScenes (com.simibubi.create.foundation.ponder.content.ProcessingScenes)1 IntAttached (com.simibubi.create.foundation.utility.IntAttached)1 NBTHelper (com.simibubi.create.foundation.utility.NBTHelper)1 Pointing (com.simibubi.create.foundation.utility.Pointing)1 Items (net.minecraft.item.Items)1 Direction (net.minecraft.util.Direction)1 Vector3d (net.minecraft.util.math.vector.Vector3d)1