diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/flamethrover/FlamethrowerItem.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/flamethrover/FlamethrowerItem.java index 1d92a633..a19af013 100644 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/flamethrover/FlamethrowerItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/items/weapons/flamethrover/FlamethrowerItem.java @@ -3,6 +3,7 @@ package com.drmangotea.tfmg.content.items.weapons.flamethrover; import com.drmangotea.tfmg.TFMGClient; import com.drmangotea.tfmg.base.spark.Spark; import com.drmangotea.tfmg.registry.TFMGEntityTypes; +import com.simibubi.create.api.equipment.potatoCannon.PotatoCannonProjectileType; import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity; import com.simibubi.create.foundation.item.CustomArmPoseItem; import net.minecraft.client.model.HumanoidModel; @@ -49,9 +50,10 @@ public class FlamethrowerItem extends Item implements CustomArmPoseItem { return; } + //if(true) // return; - level.playSound((Player)null, entity.getX(), entity.getY(), entity.getZ(), SoundEvents.FIRE_EXTINGUISH, SoundSource.NEUTRAL, 0.1F, 0.04F); + level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), SoundEvents.FIRE_EXTINGUISH, SoundSource.NEUTRAL, 0.1F, 0.04F); FlamethrowerFuel fuel = Enum.valueOf(FlamethrowerFuel.class,nbt.getString("fuel").toUpperCase()); @@ -172,7 +174,7 @@ return Math.round( 13* ((float)((float)stack.getOrCreateTag().getInt("amount")/( return UseAnim.NONE; } - enum FlamethrowerFuel{ + enum FlamethrowerFuel { GASOLINE(15,1,3,0xC4AA76), DIESEL(7,2,3,0xBA9177), diff --git a/src/main/java/com/drmangotea/tfmg/ponder/TFMGPonderScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/TFMGPonderScenes.java index b41b490b..29abcdc4 100644 --- a/src/main/java/com/drmangotea/tfmg/ponder/TFMGPonderScenes.java +++ b/src/main/java/com/drmangotea/tfmg/ponder/TFMGPonderScenes.java @@ -1,7 +1,13 @@ package com.drmangotea.tfmg.ponder; -import com.drmangotea.tfmg.ponder.scenes.MetallurgyScenes; import com.drmangotea.tfmg.ponder.scenes.MiscTFMGScenes; +import com.drmangotea.tfmg.ponder.scenes.electricity.GeneratorScenes; +import com.drmangotea.tfmg.ponder.scenes.kinetics.engines.EngineScenes; +import com.drmangotea.tfmg.ponder.scenes.metallurgy.BlastFurnaceScenes; +import com.drmangotea.tfmg.ponder.scenes.metallurgy.CokeOvenScenes; +import com.drmangotea.tfmg.ponder.scenes.metallurgy.DistillationScenes; +import com.drmangotea.tfmg.ponder.scenes.metallurgy.PumpjackScenes; +import com.drmangotea.tfmg.ponder.scenes.vat.VatScenes; import com.drmangotea.tfmg.registry.TFMGBlocks; import com.tterrag.registrate.util.entry.ItemProviderEntry; import com.tterrag.registrate.util.entry.RegistryEntry; @@ -15,24 +21,22 @@ public class TFMGPonderScenes { PonderSceneRegistrationHelper> HELPER = helper.withKeyFunction(RegistryEntry::getId); HELPER.forComponents(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER, TFMGBlocks.STEEL_DISTILLATION_OUTPUT) - .addStoryBoard("distillation_tower", MiscTFMGScenes::distillation_tower, TFMGPonderTags.OIL_PROCESSING); + .addStoryBoard("distillation_tower", DistillationScenes::distillation_tower, TFMGPonderTags.OIL_PROCESSING); HELPER.forComponents(TFMGBlocks.BLAST_FURNACE_OUTPUT, TFMGBlocks.BLAST_FURNACE_HATCH) - .addStoryBoard("blast_furnace", MetallurgyScenes::blast_furnace, TFMGPonderTags.METALLURGY); - HELPER.forComponents(TFMGBlocks.STEEL_CHEMICAL_VAT, - TFMGBlocks.CAST_IRON_CHEMICAL_VAT, - TFMGBlocks.FIREPROOF_CHEMICAL_VAT, - TFMGBlocks.INDUSTRIAL_MIXER, - TFMGBlocks.ELECTRODE_HOLDER - ).addStoryBoard("chemical_vat", MiscTFMGScenes::chemical_vat, TFMGPonderTags.CHEMICAL_VAT); + .addStoryBoard("blast_furnace", BlastFurnaceScenes::blast_furnace, TFMGPonderTags.METALLURGY); + HELPER.forComponents(TFMGBlocks.STEEL_CHEMICAL_VAT, TFMGBlocks.CAST_IRON_CHEMICAL_VAT, TFMGBlocks.FIREPROOF_CHEMICAL_VAT).addStoryBoard("chemical_vat", VatScenes::chemical_vat, TFMGPonderTags.CHEMICAL_VAT); + HELPER.forComponents( TFMGBlocks.INDUSTRIAL_MIXER).addStoryBoard("chemical_vat", VatScenes::industrial_mixer, TFMGPonderTags.CHEMICAL_VAT); + HELPER.forComponents( TFMGBlocks.ELECTRODE_HOLDER).addStoryBoard("chemical_vat", VatScenes::electrolysis, TFMGPonderTags.CHEMICAL_VAT); + HELPER.forComponents( TFMGBlocks.ELECTRODE_HOLDER).addStoryBoard("chemical_vat", VatScenes::arc_furnace, TFMGPonderTags.CHEMICAL_VAT); HELPER.forComponents(TFMGBlocks.COKE_OVEN) - .addStoryBoard("coke_oven", MetallurgyScenes::coke_oven, TFMGPonderTags.METALLURGY); + .addStoryBoard("coke_oven", CokeOvenScenes::coke_oven, TFMGPonderTags.METALLURGY); HELPER.forComponents(TFMGBlocks.PUMPJACK_BASE,TFMGBlocks.PUMPJACK_CRANK,TFMGBlocks.PUMPJACK_HAMMER) - .addStoryBoard("pumpjack", MiscTFMGScenes::pumpjack, TFMGPonderTags.OIL_PROCESSING); + .addStoryBoard("pumpjack", PumpjackScenes::pumpjack, TFMGPonderTags.OIL_PROCESSING); HELPER.forComponents(TFMGBlocks.REGULAR_ENGINE, TFMGBlocks.TURBINE_ENGINE, TFMGBlocks.RADIAL_ENGINE) - .addStoryBoard("engines", MiscTFMGScenes::engines, TFMGPonderTags.ENGINES); + .addStoryBoard("engines", EngineScenes::engines, TFMGPonderTags.ENGINES); HELPER.forComponents(TFMGBlocks.GENERATOR, TFMGBlocks.ROTOR, TFMGBlocks.STATOR, TFMGBlocks.ELECTRIC_MOTOR) - .addStoryBoard("electricity", MiscTFMGScenes::electricity, TFMGPonderTags.ELECTRIC_MACHINERY) - .addStoryBoard("electricity_two", MiscTFMGScenes::electricy_two, TFMGPonderTags.ELECTRIC_MACHINERY); + .addStoryBoard("electricity", GeneratorScenes::electricity, TFMGPonderTags.ELECTRIC_MACHINERY) + .addStoryBoard("electricity_two", GeneratorScenes::electricy_two, TFMGPonderTags.ELECTRIC_MACHINERY); } } diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/MiscTFMGScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/MiscTFMGScenes.java index fe9e430b..ce5bdc2e 100644 --- a/src/main/java/com/drmangotea/tfmg/ponder/scenes/MiscTFMGScenes.java +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/MiscTFMGScenes.java @@ -20,533 +20,6 @@ import net.minecraft.world.phys.Vec3; public class MiscTFMGScenes { - - public static void chemical_vat(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("chemical_vat", "Chemical Vat"); - scene.configureBasePlate(0, 0, 7); - scene.scaleSceneView(0.7f); - scene.showBasePlate(); - - Selection chemical_vat = util.select().fromTo(2, 2, 2, 4, 3, 4); - Selection mixer = util.select().fromTo(3, 4, 3, 3, 4, 3); - - Selection graphiteElectrodes = util.select().fromTo(3, 4, 2, 3, 4, 2) - .add(util.select().fromTo(4, 4, 4, 4, 4, 4)) - .add(util.select().fromTo(2, 4, 4, 2, 4, 4)); - - Selection copperElectrodes = util.select().fromTo(4, 4, 3, 4, 4, 3) - .add(util.select().fromTo(2, 4, 3, 2, 4, 3)); - - Selection truss = util.select().fromTo(2, 1, 2, 2, 1, 2) - .add(util.select().fromTo(4, 1, 4, 4, 1, 4)) - .add(util.select().fromTo(4, 1, 2, 4, 1, 2)) - .add(util.select().fromTo(2, 1, 4, 2, 1, 4)); - - Selection blazeBurners = util.select().fromTo(2, 1, 3, 2, 1, 3) - .add(util.select().fromTo(3, 1, 2, 3, 1, 2)) - .add(util.select().fromTo(4, 1, 3, 4, 1, 3)) - .add(util.select().fromTo(3, 1, 4, 3, 1, 4)); - - ElementLink vatElement = scene.world().showIndependentSection(chemical_vat, Direction.DOWN); - scene.world().showIndependentSection(truss, Direction.DOWN); - scene.world().rotateSection(vatElement, 0, 180, 0, 0); - - scene.overlay().showText(70) - .attachKeyFrame() - .text("The chemical vat is a machine with attachments that can give it many different uses"); - - scene.idle(90); - - ElementLink mixerElement = scene.world().showIndependentSection(mixer, Direction.UP); - scene.overlay().showText(50) - .attachKeyFrame() - .text("First attachment is the industrial mixer"); - scene.idle(80); - - - Vec3 mixerPos = util.vector().topOf(util.grid().at(3, 4, 3)); - scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.MIXER_BLADE)); - scene.idle(30); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("When the mixer blade is inserted, the vat becomes a mixer"); - scene.idle(60); - - scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.CENTRIFUGE)); - scene.idle(30); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("The industrial mixer can also become a centrifuge"); - scene.idle(80); - - scene.world().hideIndependentSection(mixerElement, Direction.UP); - - scene.idle(30); - - ElementLink burnerElement = scene.world().showIndependentSection(blazeBurners, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Some recipes need heating"); - - scene.idle(70); - - ElementLink electrolyzerElement = scene.world().showIndependentSection(copperElectrodes, Direction.DOWN); - - - Vec3 electrodePos1 = util.vector().topOf(util.grid().at(4, 4, 3)); - Vec3 electrodePos2 = util.vector().topOf(util.grid().at(2, 4, 3)); - scene.overlay().showControls(electrodePos1, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.COPPER_ELECTRODE)); - scene.overlay().showControls(electrodePos2, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.COPPER_ELECTRODE)); - scene.overlay().showText(40) - .attachKeyFrame() - .text("Placing 2 electrode holders with copper electrodes creates an electrolyzer"); - - scene.idle(60); - - scene.world().hideIndependentSection(electrolyzerElement, Direction.UP); - - scene.idle(20); - ElementLink arcFurnaceElement = scene.world().showIndependentSection(graphiteElectrodes, Direction.DOWN); - Vec3 furnacePos1 = util.vector().topOf(util.grid().at(4, 4, 2)); - Vec3 furnacePos2 = util.vector().topOf(util.grid().at(4, 4, 4)); - Vec3 furnacePos3 = util.vector().topOf(util.grid().at(2, 4, 4)); - scene.overlay().showControls(furnacePos1, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); - scene.overlay().showControls(furnacePos2, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); - scene.overlay().showControls(furnacePos3, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); - scene.overlay().showText(50) - .attachKeyFrame() - .text("3 graphite electrodes create a blast furnace"); - - scene.idle(60); - - } - - public static void electricy_two(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("electricity_two", "Electric Subnetworks"); - scene.configureBasePlate(0, 0, 5); - scene.showBasePlate(); - - Selection generator = util.select().fromTo(4, 1, 3, 2, 1, 3); - - Selection light = util.select().fromTo(0, 1, 3, 0, 2, 2); - - Selection potentiometer = util.select().fromTo(1, 1, 1, 1, 1, 1); - Selection electricSwitch = util.select().fromTo(1, 1, 2, 1, 1, 2); - Selection diode = util.select().fromTo(1, 1, 3, 1, 1, 3); - Selection transformer = util.select().fromTo(1, 1, 4, 1, 1, 4); - - - ElementLink generatorElement = scene.world().showIndependentSection(generator, Direction.DOWN); - ElementLink lightElement = scene.world().showIndependentSection(light, Direction.DOWN); - ElementLink diodeElement = scene.world().showIndependentSection(diode, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Some blocks have connections from 2 sides"); - scene.idle(60); - scene.overlay().showText(50) - .attachKeyFrame() - .text("These blocks create a new electric network on one of their sides"); - scene.idle(60); - scene.overlay().showText(90) - .attachKeyFrame() - .text("This subnetwork will get all the power from the main network but not the opposite way"); - scene.idle(100); - - //DIODE - scene.overlay().showText(70) - .attachKeyFrame() - .text("The most basic block with this ability is the Diode, it has no other extra abilities"); - scene.idle(80); - //POTENTIOMETER - scene.world().hideIndependentSection(diodeElement, Direction.NORTH); - ElementLink potentiometerElement = scene.world().showIndependentSection(potentiometer, Direction.NORTH); - scene.world().moveSection(potentiometerElement, new Vec3(0d, 0d, 2d), 0); - scene.overlay().showText(70) - .attachKeyFrame() - .text("Next one is the potentiometer, this one can set the percentage of voltage that gets to the subnetwork"); - scene.idle(80); - //SWITCH - scene.world().hideIndependentSection(potentiometerElement, Direction.NORTH); - ElementLink switchElement = scene.world().showIndependentSection(electricSwitch, Direction.NORTH); - scene.world().moveSection(switchElement, new Vec3(0d, 0d, 1d), 0); - scene.overlay().showText(70) - .attachKeyFrame() - .text("The switch works similarly but with redstone"); - scene.idle(80); - //TRANSFORMER - scene.world().hideIndependentSection(switchElement, Direction.NORTH); - ElementLink transformerElement = scene.world().showIndependentSection(transformer, Direction.NORTH); - scene.world().moveSection(transformerElement, new Vec3(0d, 0d, -1d), 0); - scene.overlay().showText(70) - .attachKeyFrame() - .text("The transformer changes voltage based on the ratio of turns between the primary and secondary coil"); - scene.idle(80); - - } - - - public static void electricity(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("electricity", "Electricity"); - scene.showBasePlate(); - - - Selection generator = util.select().fromTo(5, 1, 4, 4, 1, 4); - - Selection light1 = util.select().fromTo(3, 1, 4, 2, 2, 4); - Selection light2 = util.select().fromTo(2, 1, 3, 2, 2, 2); - Selection light3 = util.select().fromTo(2, 1, 0, 2, 2, 1); - - scene.world().showIndependentSection(generator, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("A generator creates 2 values, Voltage and Power"); - scene.idle(60); - - - //-------------------------Phase 1-------------------------// - scene.world().showIndependentSection(light1, Direction.DOWN); - - - scene.overlay().showText(240) - .attachKeyFrame() - .text( - """ - Generator: - Voltage(U) = 200V - Max Power = 8kW - Light Bulb: - Voltage(U) = 200V - Current(I) = 2A - Power(P) = 100W - Resistance(R) = 100Ω""" - ) - .independent(50) - .colored(PonderPalette.BLUE); - scene.overlay().showText(70) - .attachKeyFrame() - .text("When load is applied on a generator, it takes its voltage"); - scene.idle(80); - scene.overlay().showText(70) - .attachKeyFrame() - .text("Every an electric device has electrical resistance, light bulbs are 100 Ohm(Ω)"); - scene.idle(80); - scene.overlay().showText(70) - .attachKeyFrame() - .text("Current with size of Voltage divided by Resistance will start flowing in the light bulb"); - - scene.idle(80); - //-------------------------Phase 2-------------------------// - scene.world().showIndependentSection(light2, Direction.DOWN); - scene.overlay().showText(180) - .attachKeyFrame() - .text( - """ - Generator: - Voltage(U) = 200V - Max Power = 8kW - Light Bulb 1: - Voltage(U) = 100V - Current(I) = 1A - Resistance(R) = 100Ω - Group=0 - Light Bulb 2: - Voltage(U) = 100V - Current(I) = 1A - Resistance(R) = 100Ω - Group=0""" - ) - .independent(50) - .colored(PonderPalette.BLUE); - scene.overlay().showText(80) - .attachKeyFrame() - .text("Electric components can be connected with groups, by default all blocks are group 0"); - scene.idle(90); - scene.overlay().showText(80) - .attachKeyFrame() - .text("Blocks that share a group split voltage between them(blocks with higher resistance get more of the split voltage)"); - scene.idle(90); - //-------------------------Phase 3-------------------------// - Vec3 pos = util.vector().topOf(util.grid().at(2, 2, 4)); - scene.overlay().showControls(pos, Pointing.DOWN, 20) - .rightClick() - .withItem(new ItemStack(TFMGItems.CONFIGURATION_WRENCH)); - scene.overlay().showText(180) - .attachKeyFrame() - .text( - """ - Generator: - Voltage(U) = 200V - Max Power = 8kW - Light Bulb 1: - Voltage(U) = 200V - Current(I) = 2A - Resistance(R) = 100Ω - Group=1 - Light Bulb 2: - Voltage(U) = 200V - Current(I) = 2A - Resistance(R) = 100Ω - Group=0""" - ) - .independent(50) - .colored(PonderPalette.BLUE); - scene.overlay().showText(80) - .attachKeyFrame() - .text("Groups can be changed using the Configuration Wrench"); - scene.idle(90); - scene.overlay().showText(80) - .attachKeyFrame() - .text("Blocks in their own group keep all the voltage"); - scene.idle(90); - - - } - - public static void engines(SceneBuilder builder, SceneBuildingUtil util) { - TFMGSceneBuilder scene = new TFMGSceneBuilder(builder); - scene.title("engines", "Engines"); - scene.configureBasePlate(0, 0, 7); - - - scene.showBasePlate(); - - - Selection engine = util.select().fromTo(3, 1, 3, 3, 1, 4); - Selection engine_front = util.select().fromTo(3, 1, 2, 3, 1, 2); - Selection engine_front_shaft = util.select().fromTo(2, 1, 2, 2, 1, 2); - - Selection lever = util.select().fromTo(4, 1, 2, 4, 1, 2); - Selection cog = util.select().fromTo(3, 1, 0, 3, 1, 1); - - Selection fuelTank = util.select().fromTo(4, 1, 3, 5, 2, 3); - Selection tank = util.select().fromTo(4, 1, 4, 4, 2, 4); - Selection exhaust = util.select().fromTo(2, 1, 4, 1, 2, 4); - scene.world().setKineticSpeed(fuelTank, 70); - scene.world().setKineticSpeed(exhaust, 70); - scene.world().setKineticSpeed(cog, 70); - - - ElementLink engineElement = scene.world().showIndependentSection(engine, Direction.DOWN); - ElementLink engineFrontElement = scene.world().showIndependentSection(engine_front, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("To build an engine, start by placing up to 5 engine blocks in a line"); - - scene.idle(70); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("The engine's tooltip will show you items needed for the assembly"); - scene.idle(60); - - Vec3 enginePos = util.vector().topOf(util.grid().at(3, 1, 2)); - scene.overlay().showControls(enginePos, Pointing.DOWN, 15) - .rightClick() - .withItem(new ItemStack(TFMGItems.CRANKSHAFT)); - scene.idle(25); - scene.overlay().showControls(enginePos, Pointing.DOWN, 15) - .rightClick() - .withItem(new ItemStack(TFMGBlocks.STEEL_COGWHEEL.get())); - scene.idle(25); - scene.overlay().showControls(enginePos, Pointing.DOWN, 15) - .rightClick() - .withItem(new ItemStack(TFMGBlocks.LARGE_STEEL_COGWHEEL.get())); - scene.idle(40); - - scene.overlay().showControls(enginePos, Pointing.DOWN, 50) - .rightClick() - .withItem(new ItemStack(AllItems.EMPTY_SCHEMATIC)); - - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Engine configuration can be changed with a schematic"); - scene.idle(60); - - - scene.overlay().showText(60) - .attachKeyFrame() - .text("Next step is inserting the cylinders (or turbine blades in turbine engines)"); - - ElementLink engineFrontShaftElement = scene.world().showIndependentSection(engine_front_shaft, Direction.DOWN); - scene.world().moveSection(engineFrontShaftElement, new Vec3(1d, -2d, 0d), 0); - - BlockPos pos = util.grid().at(3, 1, 2); - for (int i = 0; i < 12; i++) { - scene.idle(5); - scene.tfmgInstructions().addPistonToEngine(pos); - - if (i == 3 || i == 7) - pos = pos.south(); - } - scene.idle(35); - scene.world().moveSection(engineFrontShaftElement, new Vec3(0d, 2d, 0d), 0); - scene.world().moveSection(engineFrontElement, new Vec3(0d, -2d, 0d), 0); - //scene.world().hideIndependentSection(engineFrontElement,Direction.DOWN); - - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Shafts are inserted by right clicking"); - scene.overlay().showControls(enginePos, Pointing.DOWN, 50) - .rightClick() - .withItem(new ItemStack(AllBlocks.SHAFT)); - scene.idle(70); - - ElementLink fuelTankElement = scene.world().showIndependentSection(fuelTank, Direction.DOWN); - scene.idle(10); - ElementLink exhuastElement = scene.world().showIndependentSection(exhaust, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Fuel input and exhaust output can be done from any block"); - scene.idle(70); - - scene.overlay().showText(50) - .attachKeyFrame() - - .text("Every engine block can be right clicked with certain items to be upgraded"); - scene.idle(60); - - scene.overlay().showControls(util.vector().topOf(util.grid().at(3, 1, 4)), Pointing.DOWN, 40) - .rightClick() - .withItem(new ItemStack(TFMGBlocks.INDUSTRIAL_PIPE)); - - scene.overlay().showText(70) - .attachKeyFrame() - .text("For example industrial pipes make the engine consume fuel from neighboring tanks"); - scene.idle(80); - scene.world().showIndependentSection(tank, Direction.DOWN); - scene.idle(30); - scene.world().setKineticSpeed(engine_front_shaft, 70); - scene.world().showIndependentSection(lever, Direction.DOWN); - scene.world().showIndependentSection(cog, Direction.DOWN); - scene.overlay().showText(128) - .attachKeyFrame() - .text("The engine can be started with a redstone signal"); - } - - - public static void pumpjack(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("pumpjack", "Pumpjack"); - scene.configureBasePlate(0, 0, 7); - - - //// - Selection pipez = util.select().fromTo(0, 2, 0, 0, 4, 0); - Selection hammer = util.select().fromTo(3, 1, 2, 3, 3, 2); - Selection base = util.select().fromTo(0, 1, 2, 0, 1, 2); - Selection crank = util.select().fromTo(6, 2, 2, 6, 2, 2); - Selection input = util.select().fromTo(5, 1, 1, 6, 1, 2); - Selection base1 = util.select().fromTo(2, 0, 0, 6, 0, 4); - Selection base2 = util.select().fromTo(0, 0, 0, 1, 0, 4); - Selection deposit = util.select().fromTo(0, 1, 0, 0, 1, 0); - Selection tank = util.select().fromTo(0, 0, 3, 1, 0, 4); - - Selection hammer_part = util.select().fromTo(1, 4, 2, 5, 4, 2); - Selection hammer_head = util.select().fromTo(6, 4, 2, 6, 4, 2); - Selection hammer_connector = util.select().fromTo(0, 4, 2, 0, 4, 2); - - - //// - // scene.scaleSceneView(.4f); - //scene.removeShadow(); - - - ElementLink baseElement1 = scene.world().showIndependentSection(base1, Direction.UP); - ElementLink baseElement2 = scene.world().showIndependentSection(base2, Direction.UP); - - scene.idle(20); - scene.world().hideIndependentSection(baseElement2, Direction.UP); - scene.idle(25); - ElementLink depositElement = scene.world().showIndependentSection(deposit, Direction.UP); - scene.world().moveSection(depositElement, new Vec3(0d, -4d, 2d), 0); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("First step of mining oil is building industrial pipes from a deposit to the surface"); - - - ElementLink pipeElement = scene.world().showIndependentSection(pipez, Direction.SOUTH); - scene.world().moveSection(pipeElement, new Vec3(0d, -4d, 2d), 0); - scene.idle(25); - scene.world().hideIndependentSection(pipeElement, Direction.DOWN); - scene.world().hideIndependentSection(depositElement, Direction.DOWN); - scene.idle(25); - scene.world().showIndependentSection(base2, Direction.SOUTH); - scene.idle(25); - ElementLink pumpjackBaseElement = scene.world().showIndependentSection(base, Direction.SOUTH); - scene.overlay().showText(50) - .attachKeyFrame() - .text("Pumpjack base has to be placed on the top of the pipe") - .pointAt(util.vector().blockSurface(util.grid().at(0, 1, 2), Direction.WEST)) - .placeNearTarget(); - scene.idle(40); - ElementLink hammerElement1 = scene.world().showIndependentSection(hammer, Direction.UP); - scene.overlay().showText(50) - .attachKeyFrame() - .text("Pumpjack Hammer Holder needs to be placed behind it") - .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) - .placeNearTarget(); - scene.idle(70); - - - ElementLink connectorElement = scene.world().showIndependentSection(hammer_connector, Direction.UP); - ElementLink headElement = scene.world().showIndependentSection(hammer_head, Direction.UP); - scene.overlay().showText(50) - .attachKeyFrame() - .text("Next step is building the Connector And the Head of the Pumpjack above the crank and the base") - .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) - .placeNearTarget(); - scene.idle(70); - ElementLink partElement = scene.world().showIndependentSection(hammer_part, Direction.UP); - scene.overlay().showText(50) - .attachKeyFrame() - .text("Now they need to be connected with Pumpjack Hammer Parts") - .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) - .placeNearTarget(); - - - scene.idle(40); - scene.world().setKineticSpeed(input, 70); - scene.world().setKineticSpeed(base1, -140); - scene.world().showIndependentSection(input, Direction.SOUTH); - scene.idle(10); - scene.world().showIndependentSection(crank, Direction.SOUTH); - scene.overlay().showText(50) - .attachKeyFrame() - .text("The last step is placing a machine input (which is the power input for the pumpjack) with a pumpjack crank above it") - .pointAt(util.vector().blockSurface(util.grid().at(5, 1, 2), Direction.WEST)) - .placeNearTarget(); - scene.idle(60); - - - } - public static void diesel_engine(SceneBuilder builder, SceneBuildingUtil util) { CreateSceneBuilder scene = new CreateSceneBuilder(builder); scene.title("diesel_engine", ""); @@ -685,64 +158,7 @@ public class MiscTFMGScenes { } - public static void distillation_tower(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("distillation_tower", ""); - scene.configureBasePlate(0, 0, 6); - scene.showBasePlate(); - scene.scaleSceneView(.6f); - Selection burners = util.select().fromTo(3, 1, 3, 4, 1, 4); - Selection tank = util.select().fromTo(3, 2, 3, 4, 8, 4); - Selection controller = util.select().fromTo(3, 1, 2, 3, 2, 2); - Selection output = util.select().fromTo(3, 3, 2, 3, 8, 2); - Selection oil_tank = util.select().fromTo(0, 1, 0, 2, 3, 4); - scene.world().setKineticSpeed(oil_tank, 80); - ElementLink tankElement = scene.world().showIndependentSection(tank, Direction.DOWN); - - scene.overlay().showText(70) - .attachKeyFrame() - .text("The base of a distillation tower is comprised of steel tanks") - .pointAt(util.vector().blockSurface(util.grid().at(4, 6, 3), Direction.WEST)) - .placeNearTarget(); - scene.idle(80); - ElementLink controllerElement = scene.world().showIndependentSection(controller, Direction.DOWN); - - scene.overlay().showText(50) - .attachKeyFrame() - .text("Tower is assembled by placing Steel Distillation Controller next to the tanks") - .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 3), Direction.WEST)) - .placeNearTarget(); - - scene.idle(70); - ElementLink outputElement = scene.world().showIndependentSection(output, Direction.DOWN); - scene.overlay().showText(60) - .attachKeyFrame() - .text("To finish the multiblock, place up to 6 Distillation outputs and Industrial Pipes between them") - .pointAt(util.vector().blockSurface(util.grid().at(2, 7, 3), Direction.WEST)) - .placeNearTarget(); - scene.idle(70); - - - ElementLink burnerElement = scene.world().showIndependentSection(burners, Direction.DOWN); - scene.overlay().showText(60) - .attachKeyFrame() - .text("Place a heat source under the tanks to power it, the dial on the tower shows the power level of the structure ") - .pointAt(util.vector().blockSurface(util.grid().at(3, 1, 2), Direction.WEST)) - .placeNearTarget(); - scene.idle(70); - - scene.world().showIndependentSection(oil_tank, Direction.DOWN); - - scene.overlay().showText(60) - .attachKeyFrame() - .text("Oil is inputted into the controller block") - .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 3), Direction.WEST)) - .placeNearTarget(); - scene.idle(80); - - - } public static void radial_engines(SceneBuilder builder, SceneBuildingUtil util) { CreateSceneBuilder scene = new CreateSceneBuilder(builder); diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/ApplianceScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/ApplianceScenes.java new file mode 100644 index 00000000..7c5a588b --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/ApplianceScenes.java @@ -0,0 +1,4 @@ +package com.drmangotea.tfmg.ponder.scenes.electricity; + +public class ApplianceScenes { +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/GeneratorScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/GeneratorScenes.java new file mode 100644 index 00000000..babdac8e --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/electricity/GeneratorScenes.java @@ -0,0 +1,201 @@ +package com.drmangotea.tfmg.ponder.scenes.electricity; + +import com.drmangotea.tfmg.registry.TFMGItems; +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; +import net.createmod.catnip.math.Pointing; +import net.createmod.ponder.api.PonderPalette; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.WorldSectionElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; + +public class GeneratorScenes { + + public static void electricity(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("electricity", "Electricity"); + scene.showBasePlate(); + + + Selection generator = util.select().fromTo(5, 1, 4, 4, 1, 4); + + Selection light1 = util.select().fromTo(3, 1, 4, 2, 2, 4); + Selection light2 = util.select().fromTo(2, 1, 3, 2, 2, 2); + Selection light3 = util.select().fromTo(2, 1, 0, 2, 2, 1); + + scene.world().showIndependentSection(generator, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("A generator creates 2 values, Voltage and Power"); + scene.idle(60); + + + //-------------------------Phase 1-------------------------// + scene.world().showIndependentSection(light1, Direction.DOWN); + + + scene.overlay().showText(240) + .attachKeyFrame() + .text( + """ + Generator: + Voltage(U) = 200V + Max Power = 8kW + Light Bulb: + Voltage(U) = 200V + Current(I) = 2A + Power(P) = 100W + Resistance(R) = 100Ω""" + ) + .independent(50) + .colored(PonderPalette.BLUE); + scene.overlay().showText(70) + .attachKeyFrame() + .text("When load is applied on a generator, it takes its voltage"); + scene.idle(80); + scene.overlay().showText(70) + .attachKeyFrame() + .text("Every an electric device has electrical resistance, light bulbs are 100 Ohm(Ω)"); + scene.idle(80); + scene.overlay().showText(70) + .attachKeyFrame() + .text("Current with size of Voltage divided by Resistance will start flowing in the light bulb"); + + scene.idle(80); + //-------------------------Phase 2-------------------------// + scene.world().showIndependentSection(light2, Direction.DOWN); + scene.overlay().showText(180) + .attachKeyFrame() + .text( + """ + Generator: + Voltage(U) = 200V + Max Power = 8kW + Light Bulb 1: + Voltage(U) = 100V + Current(I) = 1A + Resistance(R) = 100Ω + Group=0 + Light Bulb 2: + Voltage(U) = 100V + Current(I) = 1A + Resistance(R) = 100Ω + Group=0""" + ) + .independent(50) + .colored(PonderPalette.BLUE); + scene.overlay().showText(80) + .attachKeyFrame() + .text("Electric components can be connected with groups, by default all blocks are group 0"); + scene.idle(90); + scene.overlay().showText(80) + .attachKeyFrame() + .text("Blocks that share a group split voltage between them(blocks with higher resistance get more of the split voltage)"); + scene.idle(90); + //-------------------------Phase 3-------------------------// + Vec3 pos = util.vector().topOf(util.grid().at(2, 2, 4)); + scene.overlay().showControls(pos, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.CONFIGURATION_WRENCH)); + scene.overlay().showText(180) + .attachKeyFrame() + .text( + """ + Generator: + Voltage(U) = 200V + Max Power = 8kW + Light Bulb 1: + Voltage(U) = 200V + Current(I) = 2A + Resistance(R) = 100Ω + Group=1 + Light Bulb 2: + Voltage(U) = 200V + Current(I) = 2A + Resistance(R) = 100Ω + Group=0""" + ) + .independent(50) + .colored(PonderPalette.BLUE); + scene.overlay().showText(80) + .attachKeyFrame() + .text("Groups can be changed using the Configuration Wrench"); + scene.idle(90); + scene.overlay().showText(80) + .attachKeyFrame() + .text("Blocks in their own group keep all the voltage"); + scene.idle(90); + + + } + + public static void electricy_two(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("electricity_two", "Electric Subnetworks"); + scene.configureBasePlate(0, 0, 5); + scene.showBasePlate(); + + Selection generator = util.select().fromTo(4, 1, 3, 2, 1, 3); + + Selection light = util.select().fromTo(0, 1, 3, 0, 2, 2); + + Selection potentiometer = util.select().fromTo(1, 1, 1, 1, 1, 1); + Selection electricSwitch = util.select().fromTo(1, 1, 2, 1, 1, 2); + Selection diode = util.select().fromTo(1, 1, 3, 1, 1, 3); + Selection transformer = util.select().fromTo(1, 1, 4, 1, 1, 4); + + + ElementLink generatorElement = scene.world().showIndependentSection(generator, Direction.DOWN); + ElementLink lightElement = scene.world().showIndependentSection(light, Direction.DOWN); + ElementLink diodeElement = scene.world().showIndependentSection(diode, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Some blocks have connections from 2 sides"); + scene.idle(60); + scene.overlay().showText(50) + .attachKeyFrame() + .text("These blocks create a new electric network on one of their sides"); + scene.idle(60); + scene.overlay().showText(90) + .attachKeyFrame() + .text("This subnetwork will get all the power from the main network but not the opposite way"); + scene.idle(100); + + //DIODE + scene.overlay().showText(70) + .attachKeyFrame() + .text("The most basic block with this ability is the Diode, it has no other extra abilities"); + scene.idle(80); + //POTENTIOMETER + scene.world().hideIndependentSection(diodeElement, Direction.NORTH); + ElementLink potentiometerElement = scene.world().showIndependentSection(potentiometer, Direction.NORTH); + scene.world().moveSection(potentiometerElement, new Vec3(0d, 0d, 2d), 0); + scene.overlay().showText(70) + .attachKeyFrame() + .text("Next one is the potentiometer, this one can set the percentage of voltage that gets to the subnetwork"); + scene.idle(80); + //SWITCH + scene.world().hideIndependentSection(potentiometerElement, Direction.NORTH); + ElementLink switchElement = scene.world().showIndependentSection(electricSwitch, Direction.NORTH); + scene.world().moveSection(switchElement, new Vec3(0d, 0d, 1d), 0); + scene.overlay().showText(70) + .attachKeyFrame() + .text("The switch works similarly but with redstone"); + scene.idle(80); + //TRANSFORMER + scene.world().hideIndependentSection(switchElement, Direction.NORTH); + ElementLink transformerElement = scene.world().showIndependentSection(transformer, Direction.NORTH); + scene.world().moveSection(transformerElement, new Vec3(0d, 0d, -1d), 0); + scene.overlay().showText(70) + .attachKeyFrame() + .text("The transformer changes voltage based on the ratio of turns between the primary and secondary coil"); + scene.idle(80); + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/kinetics/engines/EngineScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/kinetics/engines/EngineScenes.java new file mode 100644 index 00000000..3d6b929a --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/kinetics/engines/EngineScenes.java @@ -0,0 +1,145 @@ +package com.drmangotea.tfmg.ponder.scenes.kinetics.engines; + +import com.drmangotea.tfmg.ponder.TFMGSceneBuilder; +import com.drmangotea.tfmg.registry.TFMGBlocks; +import com.drmangotea.tfmg.registry.TFMGItems; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; +import net.createmod.catnip.math.Pointing; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.WorldSectionElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; + +public class EngineScenes { + + public static void engines(SceneBuilder builder, SceneBuildingUtil util) { + TFMGSceneBuilder scene = new TFMGSceneBuilder(builder); + scene.title("engines", "Engines"); + scene.configureBasePlate(0, 0, 7); + + + scene.showBasePlate(); + + + Selection engine = util.select().fromTo(3, 1, 3, 3, 1, 4); + Selection engine_front = util.select().fromTo(3, 1, 2, 3, 1, 2); + Selection engine_front_shaft = util.select().fromTo(2, 1, 2, 2, 1, 2); + + Selection lever = util.select().fromTo(4, 1, 2, 4, 1, 2); + Selection cog = util.select().fromTo(3, 1, 0, 3, 1, 1); + + Selection fuelTank = util.select().fromTo(4, 1, 3, 5, 2, 3); + Selection tank = util.select().fromTo(4, 1, 4, 4, 2, 4); + Selection exhaust = util.select().fromTo(2, 1, 4, 1, 2, 4); + scene.world().setKineticSpeed(fuelTank, 70); + scene.world().setKineticSpeed(exhaust, 70); + scene.world().setKineticSpeed(cog, 70); + + + ElementLink engineElement = scene.world().showIndependentSection(engine, Direction.DOWN); + ElementLink engineFrontElement = scene.world().showIndependentSection(engine_front, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("To build an engine, start by placing up to 5 engine blocks in a line"); + + scene.idle(70); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("The engine's tooltip will show you items needed for the assembly"); + scene.idle(60); + + Vec3 enginePos = util.vector().topOf(util.grid().at(3, 1, 2)); + scene.overlay().showControls(enginePos, Pointing.DOWN, 15) + .rightClick() + .withItem(new ItemStack(TFMGItems.CRANKSHAFT)); + scene.idle(25); + scene.overlay().showControls(enginePos, Pointing.DOWN, 15) + .rightClick() + .withItem(new ItemStack(TFMGBlocks.STEEL_COGWHEEL.get())); + scene.idle(25); + scene.overlay().showControls(enginePos, Pointing.DOWN, 15) + .rightClick() + .withItem(new ItemStack(TFMGBlocks.LARGE_STEEL_COGWHEEL.get())); + scene.idle(40); + + scene.overlay().showControls(enginePos, Pointing.DOWN, 50) + .rightClick() + .withItem(new ItemStack(AllItems.EMPTY_SCHEMATIC)); + + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Engine configuration can be changed with a schematic"); + scene.idle(60); + + + scene.overlay().showText(60) + .attachKeyFrame() + .text("Next step is inserting the cylinders (or turbine blades in turbine engines)"); + + ElementLink engineFrontShaftElement = scene.world().showIndependentSection(engine_front_shaft, Direction.DOWN); + scene.world().moveSection(engineFrontShaftElement, new Vec3(1d, -2d, 0d), 0); + + BlockPos pos = util.grid().at(3, 1, 2); + for (int i = 0; i < 12; i++) { + scene.idle(5); + scene.tfmgInstructions().addPistonToEngine(pos); + + if (i == 3 || i == 7) + pos = pos.south(); + } + scene.idle(35); + scene.world().moveSection(engineFrontShaftElement, new Vec3(0d, 2d, 0d), 0); + scene.world().moveSection(engineFrontElement, new Vec3(0d, -2d, 0d), 0); + //scene.world().hideIndependentSection(engineFrontElement,Direction.DOWN); + + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Shafts are inserted by right clicking"); + scene.overlay().showControls(enginePos, Pointing.DOWN, 50) + .rightClick() + .withItem(new ItemStack(AllBlocks.SHAFT)); + scene.idle(70); + + ElementLink fuelTankElement = scene.world().showIndependentSection(fuelTank, Direction.DOWN); + scene.idle(10); + ElementLink exhuastElement = scene.world().showIndependentSection(exhaust, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Fuel input and exhaust output can be done from any block"); + scene.idle(70); + + scene.overlay().showText(50) + .attachKeyFrame() + + .text("Every engine block can be right clicked with certain items to be upgraded"); + scene.idle(60); + + scene.overlay().showControls(util.vector().topOf(util.grid().at(3, 1, 4)), Pointing.DOWN, 40) + .rightClick() + .withItem(new ItemStack(TFMGBlocks.INDUSTRIAL_PIPE)); + + scene.overlay().showText(70) + .attachKeyFrame() + .text("For example industrial pipes make the engine consume fuel from neighboring tanks"); + scene.idle(80); + scene.world().showIndependentSection(tank, Direction.DOWN); + scene.idle(30); + scene.world().setKineticSpeed(engine_front_shaft, 70); + scene.world().showIndependentSection(lever, Direction.DOWN); + scene.world().showIndependentSection(cog, Direction.DOWN); + scene.overlay().showText(128) + .attachKeyFrame() + .text("The engine can be started with a redstone signal"); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/MetallurgyScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/BlastFurnaceScenes.java similarity index 70% rename from src/main/java/com/drmangotea/tfmg/ponder/scenes/MetallurgyScenes.java rename to src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/BlastFurnaceScenes.java index 83e915b2..ba8d7215 100644 --- a/src/main/java/com/drmangotea/tfmg/ponder/scenes/MetallurgyScenes.java +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/BlastFurnaceScenes.java @@ -1,22 +1,18 @@ -package com.drmangotea.tfmg.ponder.scenes; +package com.drmangotea.tfmg.ponder.scenes.metallurgy; import com.drmangotea.tfmg.registry.TFMGItems; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import net.createmod.ponder.api.element.ElementLink; -import net.createmod.ponder.api.element.EntityElement; import net.createmod.ponder.api.element.WorldSectionElement; import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.Selection; import net.minecraft.core.Direction; -import net.minecraft.world.entity.Entity; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.phys.Vec3; -public class MetallurgyScenes { - +public class BlastFurnaceScenes { public static void blast_furnace(SceneBuilder builder, SceneBuildingUtil util) { CreateSceneBuilder scene = new CreateSceneBuilder(builder); scene.title("blast_furnace", ""); @@ -176,95 +172,4 @@ public class MetallurgyScenes { scene.idle(80); } - - public static void coke_oven(SceneBuilder builder, SceneBuildingUtil util) { - CreateSceneBuilder scene = new CreateSceneBuilder(builder); - scene.title("coke_oven", ""); - scene.configureBasePlate(0, 0, 6); - scene.scaleSceneView(.7f); - - scene.showBasePlate(); - - - Selection coke_oven_middle = util.select().fromTo(3, 1, 2, 3, 3, 4); - - Selection coke_oven_right = util.select().fromTo(4, 1, 2, 5, 3, 4); - Selection coke_oven_left = util.select().fromTo(2, 1, 2, 1, 3, 4); - - Selection chutes = util.select().fromTo(2, 4, 3, 4, 4, 3); - Selection exhaust = util.select().fromTo(2, 4, 2, 4, 4, 2) - .add(util.select().fromTo(0, 1, 2, 1, 5, 2)) - ; - - - Selection creosoteOutput = util.select().fromTo(0, 1, 5, 5, 5, 5); - - ItemStack coal = new ItemStack(Items.COAL, 3); - ItemStack coal_coke = new ItemStack(TFMGItems.COAL_COKE.get(), 10); - - scene.world().setKineticSpeed(creosoteOutput, 80); - scene.world().setKineticSpeed(exhaust, 80); - - - scene.world().showIndependentSection(coke_oven_middle, Direction.DOWN); - scene.overlay().showText(70) - .attachKeyFrame() - .text("The Coke Oven is a machine that produces coal coke from coal") - .pointAt(util.vector().blockSurface(util.grid().at(3, 2, 2), Direction.WEST)) - .placeNearTarget(); - - scene.idle(90); - - - - scene.world().showIndependentSection(coke_oven_right, Direction.DOWN); - scene.world().showIndependentSection(coke_oven_left, Direction.DOWN); - scene.overlay().showText(70) - .attachKeyFrame() - .text("It is very slow so it is beneficial to have long arrays of them") - .pointAt(util.vector().blockSurface(util.grid().at(1, 2, 2), Direction.WEST)) - .placeNearTarget(); - - - scene.idle(30); - - - scene.world().showIndependentSection(chutes, Direction.DOWN); - scene.overlay().showText(70) - .attachKeyFrame() - .text("Coal can be inserted from anywhere"); - scene.idle(10); - ElementLink item = null; - for (int i = 0; i < 3; i++) { - scene.idle(10); - - for (int y = 0; y < 3; y++) { - - item = scene.world().createItemEntity(util.vector().centerOf(2 + y, 6, 3), util.vector().of(0, 0, 0), coal); - } - } - if (item != null) - scene.world().modifyEntity(item, Entity::discard); - scene.idle(40); - - scene.world().showIndependentSection(creosoteOutput, Direction.DOWN); - scene.idle(40); - scene.world().showIndependentSection(exhaust, Direction.DOWN); - - scene.overlay().showText(70) - .attachKeyFrame() - .text("Carbon Dioxide is extracted at the top, Creosote can be extracted anywhere else") - .pointAt(util.vector().blockSurface(util.grid().at(3, 4, 2), Direction.WEST)) - .placeNearTarget(); - - scene.idle(100); - - scene.overlay().showText(70) - .attachKeyFrame() - .text("After some time, coal coke will fall out of the machine"); - - for (int y = 0; y < 3; y++) { - scene.world().createItemEntity(util.vector().centerOf(2 + y, 2, 1), util.vector().of(0, 0, 0), coal_coke); - } - } } diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/CokeOvenScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/CokeOvenScenes.java new file mode 100644 index 00000000..b6998ae0 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/CokeOvenScenes.java @@ -0,0 +1,106 @@ +package com.drmangotea.tfmg.ponder.scenes.metallurgy; + +import com.drmangotea.tfmg.registry.TFMGItems; +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.EntityElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; + +public class CokeOvenScenes { + public static void coke_oven(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("coke_oven", ""); + scene.configureBasePlate(0, 0, 6); + scene.scaleSceneView(.7f); + + scene.showBasePlate(); + + + Selection coke_oven_middle = util.select().fromTo(3, 1, 2, 3, 3, 4); + + Selection coke_oven_right = util.select().fromTo(4, 1, 2, 5, 3, 4); + Selection coke_oven_left = util.select().fromTo(2, 1, 2, 1, 3, 4); + + Selection chutes = util.select().fromTo(2, 4, 3, 4, 4, 3); + Selection exhaust = util.select().fromTo(2, 4, 2, 4, 4, 2) + .add(util.select().fromTo(0, 1, 2, 1, 5, 2)) + ; + + + Selection creosoteOutput = util.select().fromTo(0, 1, 5, 5, 5, 5); + + ItemStack coal = new ItemStack(Items.COAL, 3); + ItemStack coal_coke = new ItemStack(TFMGItems.COAL_COKE.get(), 10); + + scene.world().setKineticSpeed(creosoteOutput, 80); + scene.world().setKineticSpeed(exhaust, 80); + + + scene.world().showIndependentSection(coke_oven_middle, Direction.DOWN); + scene.overlay().showText(70) + .attachKeyFrame() + .text("The Coke Oven is a machine that produces coal coke from coal") + .pointAt(util.vector().blockSurface(util.grid().at(3, 2, 2), Direction.WEST)) + .placeNearTarget(); + + scene.idle(90); + + + + scene.world().showIndependentSection(coke_oven_right, Direction.DOWN); + scene.world().showIndependentSection(coke_oven_left, Direction.DOWN); + scene.overlay().showText(70) + .attachKeyFrame() + .text("It is very slow so it is beneficial to have long arrays of them") + .pointAt(util.vector().blockSurface(util.grid().at(1, 2, 2), Direction.WEST)) + .placeNearTarget(); + + + scene.idle(30); + + + scene.world().showIndependentSection(chutes, Direction.DOWN); + scene.overlay().showText(70) + .attachKeyFrame() + .text("Coal can be inserted from anywhere"); + scene.idle(10); + ElementLink item = null; + for (int i = 0; i < 3; i++) { + scene.idle(10); + + for (int y = 0; y < 3; y++) { + + item = scene.world().createItemEntity(util.vector().centerOf(2 + y, 6, 3), util.vector().of(0, 0, 0), coal); + } + } + if (item != null) + scene.world().modifyEntity(item, Entity::discard); + scene.idle(40); + + scene.world().showIndependentSection(creosoteOutput, Direction.DOWN); + scene.idle(40); + scene.world().showIndependentSection(exhaust, Direction.DOWN); + + scene.overlay().showText(70) + .attachKeyFrame() + .text("Carbon Dioxide is extracted at the top, Creosote can be extracted anywhere else") + .pointAt(util.vector().blockSurface(util.grid().at(3, 4, 2), Direction.WEST)) + .placeNearTarget(); + + scene.idle(100); + + scene.overlay().showText(70) + .attachKeyFrame() + .text("After some time, coal coke will fall out of the machine"); + + for (int y = 0; y < 3; y++) { + scene.world().createItemEntity(util.vector().centerOf(2 + y, 2, 1), util.vector().of(0, 0, 0), coal_coke); + } + } +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/DistillationScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/DistillationScenes.java new file mode 100644 index 00000000..6b8e3882 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/DistillationScenes.java @@ -0,0 +1,70 @@ +package com.drmangotea.tfmg.ponder.scenes.metallurgy; + +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.WorldSectionElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.Direction; + +public class DistillationScenes { + public static void distillation_tower(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("distillation_tower", ""); + scene.configureBasePlate(0, 0, 6); + scene.showBasePlate(); + scene.scaleSceneView(.6f); + Selection burners = util.select().fromTo(3, 1, 3, 4, 1, 4); + Selection tank = util.select().fromTo(3, 2, 3, 4, 8, 4); + Selection controller = util.select().fromTo(3, 1, 2, 3, 2, 2); + Selection output = util.select().fromTo(3, 3, 2, 3, 8, 2); + Selection oil_tank = util.select().fromTo(0, 1, 0, 2, 3, 4); + scene.world().setKineticSpeed(oil_tank, 80); + + ElementLink tankElement = scene.world().showIndependentSection(tank, Direction.DOWN); + + scene.overlay().showText(70) + .attachKeyFrame() + .text("The base of a distillation tower is comprised of steel tanks") + .pointAt(util.vector().blockSurface(util.grid().at(4, 6, 3), Direction.WEST)) + .placeNearTarget(); + scene.idle(80); + ElementLink controllerElement = scene.world().showIndependentSection(controller, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Tower is assembled by placing Steel Distillation Controller next to the tanks") + .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 3), Direction.WEST)) + .placeNearTarget(); + + scene.idle(70); + ElementLink outputElement = scene.world().showIndependentSection(output, Direction.DOWN); + scene.overlay().showText(60) + .attachKeyFrame() + .text("To finish the multiblock, place up to 6 Distillation outputs and Industrial Pipes between them") + .pointAt(util.vector().blockSurface(util.grid().at(2, 7, 3), Direction.WEST)) + .placeNearTarget(); + scene.idle(70); + + + ElementLink burnerElement = scene.world().showIndependentSection(burners, Direction.DOWN); + scene.overlay().showText(60) + .attachKeyFrame() + .text("Place a heat source under the tanks to power it, the dial on the tower shows the power level of the structure ") + .pointAt(util.vector().blockSurface(util.grid().at(3, 1, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(70); + + scene.world().showIndependentSection(oil_tank, Direction.DOWN); + + scene.overlay().showText(60) + .attachKeyFrame() + .text("Oil is inputted into the controller block") + .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 3), Direction.WEST)) + .placeNearTarget(); + scene.idle(80); + + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/PumpjackScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/PumpjackScenes.java new file mode 100644 index 00000000..702ce825 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/metallurgy/PumpjackScenes.java @@ -0,0 +1,129 @@ +package com.drmangotea.tfmg.ponder.scenes.metallurgy; + +import com.simibubi.create.AllItems; +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; +import com.simibubi.create.infrastructure.ponder.scenes.BearingScenes; +import net.createmod.catnip.math.Pointing; +import net.createmod.ponder.api.PonderPalette; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.WorldSectionElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; + +public class PumpjackScenes { + public static void pumpjack(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("pumpjack", "Pumpjack"); + scene.configureBasePlate(0, 0, 7); + + + //// + Selection pipez = util.select().fromTo(0, 2, 0, 0, 4, 0); + Selection hammer = util.select().fromTo(3, 1, 2, 3, 3, 2); + Selection base = util.select().fromTo(0, 1, 2, 0, 1, 2); + Selection crank = util.select().fromTo(6, 2, 2, 6, 2, 2); + Selection input = util.select().fromTo(5, 1, 1, 6, 1, 2); + Selection base1 = util.select().fromTo(2, 0, 0, 6, 0, 4); + Selection base2 = util.select().fromTo(0, 0, 0, 1, 0, 4); + Selection deposit = util.select().fromTo(0, 1, 0, 0, 1, 0); + Selection tank = util.select().fromTo(0, 0, 3, 1, 0, 4); + + Selection hammer_part = util.select().fromTo(1, 4, 2, 5, 4, 2); + Selection hammer_head = util.select().fromTo(6, 4, 2, 6, 4, 2); + Selection hammer_connector = util.select().fromTo(0, 4, 2, 0, 4, 2); + + + //// + // scene.scaleSceneView(.4f); + //scene.removeShadow(); + + + ElementLink baseElement1 = scene.world().showIndependentSection(base1, Direction.UP); + ElementLink baseElement2 = scene.world().showIndependentSection(base2, Direction.UP); + + scene.idle(20); + scene.world().hideIndependentSection(baseElement2, Direction.UP); + scene.idle(25); + ElementLink depositElement = scene.world().showIndependentSection(deposit, Direction.UP); + scene.world().moveSection(depositElement, new Vec3(0d, -4d, 2d), 0); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("First step of mining oil is building industrial pipes from a deposit to the surface"); + + + ElementLink pipeElement = scene.world().showIndependentSection(pipez, Direction.SOUTH); + scene.world().moveSection(pipeElement, new Vec3(0d, -4d, 2d), 0); + scene.idle(25); + scene.world().hideIndependentSection(pipeElement, Direction.DOWN); + scene.world().hideIndependentSection(depositElement, Direction.DOWN); + scene.idle(25); + scene.world().showIndependentSection(base2, Direction.SOUTH); + scene.idle(25); + ElementLink pumpjackBaseElement = scene.world().showIndependentSection(base, Direction.SOUTH); + scene.overlay().showText(50) + .attachKeyFrame() + .text("Pumpjack base has to be placed on the top of the pipe") + .pointAt(util.vector().blockSurface(util.grid().at(0, 1, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(40); + ElementLink hammerElement1 = scene.world().showIndependentSection(hammer, Direction.UP); + scene.overlay().showText(50) + .attachKeyFrame() + .text("Pumpjack Hammer Holder needs to be placed behind it") + .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(70); + + + ElementLink connectorElement = scene.world().showIndependentSection(hammer_connector, Direction.UP); + ElementLink headElement = scene.world().showIndependentSection(hammer_head, Direction.UP); + scene.overlay().showText(50) + .attachKeyFrame() + .text("Next step is building the Connector And the Head of the Pumpjack above the crank and the base") + .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(70); + ElementLink partElement = scene.world().showIndependentSection(hammer_part, Direction.UP); + scene.overlay().showText(50) + .attachKeyFrame() + .text("Now they need to be connected with Pumpjack Hammer Parts") + .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(50); + + AABB hammerHeadBB = new AABB(util.grid().at(6, 4, 2)); + + scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, hammerHeadBB, hammerHeadBB, 1); + scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, hammerHeadBB, hammerHeadBB.expandTowards(-6, 0, 0), 80); + scene.idle(10); + scene.overlay().showControls(util.vector().centerOf(util.grid().at(4, 4, 2)), Pointing.RIGHT, 40) + .withItem(AllItems.SUPER_GLUE.asStack()); + + scene.idle(15); + scene.overlay().showText(60) + .pointAt(util.vector().blockSurface(util.grid().at(4, 4, 2), Direction.NORTH)) + .attachKeyFrame() + .placeNearTarget() + .text("Make sure to use Super Glue, otherwise the pumpjack will not assemble properly"); + scene.idle(70); + + scene.world().setKineticSpeed(input, 70); + scene.world().setKineticSpeed(base1, -140); + scene.world().showIndependentSection(input, Direction.SOUTH); + scene.idle(10); + scene.world().showIndependentSection(crank, Direction.SOUTH); + scene.overlay().showText(50) + .attachKeyFrame() + .text("The last step is placing a machine input (which is the power input for the pumpjack) with a pumpjack crank above it") + .pointAt(util.vector().blockSurface(util.grid().at(5, 1, 2), Direction.WEST)) + .placeNearTarget(); + scene.idle(60); + + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/ponder/scenes/vat/VatScenes.java b/src/main/java/com/drmangotea/tfmg/ponder/scenes/vat/VatScenes.java new file mode 100644 index 00000000..4c26a9ed --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/ponder/scenes/vat/VatScenes.java @@ -0,0 +1,258 @@ +package com.drmangotea.tfmg.ponder.scenes.vat; + +import com.drmangotea.tfmg.registry.TFMGItems; +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; +import net.createmod.catnip.math.Pointing; +import net.createmod.ponder.api.element.ElementLink; +import net.createmod.ponder.api.element.WorldSectionElement; +import net.createmod.ponder.api.scene.SceneBuilder; +import net.createmod.ponder.api.scene.SceneBuildingUtil; +import net.createmod.ponder.api.scene.Selection; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; + +public class VatScenes { + public static void chemical_vat(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("chemical_vat", "Chemical Vat"); + scene.configureBasePlate(0, 0, 7); + scene.scaleSceneView(0.7f); + scene.showBasePlate(); + + Selection chemical_vat = util.select().fromTo(2, 2, 2, 4, 3, 4); + Selection mixer = util.select().fromTo(3, 4, 3, 3, 4, 3); + + Selection graphiteElectrodes = util.select().fromTo(3, 4, 2, 3, 4, 2) + .add(util.select().fromTo(4, 4, 4, 4, 4, 4)) + .add(util.select().fromTo(2, 4, 4, 2, 4, 4)); + + Selection copperElectrodes = util.select().fromTo(4, 4, 3, 4, 4, 3) + .add(util.select().fromTo(2, 4, 3, 2, 4, 3)); + + Selection truss = util.select().fromTo(2, 1, 2, 2, 1, 2) + .add(util.select().fromTo(4, 1, 4, 4, 1, 4)) + .add(util.select().fromTo(4, 1, 2, 4, 1, 2)) + .add(util.select().fromTo(2, 1, 4, 2, 1, 4)); + + Selection blazeBurners = util.select().fromTo(2, 1, 3, 2, 1, 3) + .add(util.select().fromTo(3, 1, 2, 3, 1, 2)) + .add(util.select().fromTo(4, 1, 3, 4, 1, 3)) + .add(util.select().fromTo(3, 1, 4, 3, 1, 4)); + + ElementLink vatElement = scene.world().showIndependentSection(chemical_vat, Direction.DOWN); + scene.world().showIndependentSection(truss, Direction.DOWN); + scene.world().rotateSection(vatElement, 0, 180, 0, 0); + + scene.overlay().showText(70) + .attachKeyFrame() + .text("The chemical vat is a machine with attachments that can give it many different uses"); + + scene.idle(90); + + ElementLink mixerElement = scene.world().showIndependentSection(mixer, Direction.UP); + scene.overlay().showText(50) + .attachKeyFrame() + .text("First attachment is the industrial mixer"); + scene.idle(80); + + + Vec3 mixerPos = util.vector().topOf(util.grid().at(3, 4, 3)); + scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.MIXER_BLADE)); + scene.idle(30); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("When the mixer blade is inserted, the vat becomes a mixer"); + scene.idle(60); + + scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.CENTRIFUGE)); + scene.idle(30); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("The industrial mixer can also become a centrifuge"); + scene.idle(80); + + scene.world().hideIndependentSection(mixerElement, Direction.UP); + + scene.idle(30); + + ElementLink burnerElement = scene.world().showIndependentSection(blazeBurners, Direction.DOWN); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("Some recipes need heating"); + + scene.idle(70); + + ElementLink electrolyzerElement = scene.world().showIndependentSection(copperElectrodes, Direction.DOWN); + + + Vec3 electrodePos1 = util.vector().topOf(util.grid().at(4, 4, 3)); + Vec3 electrodePos2 = util.vector().topOf(util.grid().at(2, 4, 3)); + scene.overlay().showControls(electrodePos1, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.COPPER_ELECTRODE)); + scene.overlay().showControls(electrodePos2, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.COPPER_ELECTRODE)); + scene.overlay().showText(40) + .attachKeyFrame() + .text("Placing 2 electrode holders with copper electrodes creates an electrolyzer"); + + scene.idle(60); + + scene.world().hideIndependentSection(electrolyzerElement, Direction.UP); + + scene.idle(20); + ElementLink arcFurnaceElement = scene.world().showIndependentSection(graphiteElectrodes, Direction.DOWN); + Vec3 furnacePos1 = util.vector().topOf(util.grid().at(4, 4, 2)); + Vec3 furnacePos2 = util.vector().topOf(util.grid().at(4, 4, 4)); + Vec3 furnacePos3 = util.vector().topOf(util.grid().at(2, 4, 4)); + scene.overlay().showControls(furnacePos1, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + scene.overlay().showControls(furnacePos2, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + scene.overlay().showControls(furnacePos3, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + scene.overlay().showText(50) + .attachKeyFrame() + .text("3 graphite electrodes create a blast furnace"); + + scene.idle(60); + + } + + public static void industrial_mixer(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("industrial_mixer", "Industrial Mixer"); + scene.configureBasePlate(0, 0, 7); + scene.scaleSceneView(0.7f); + scene.showBasePlate(); + + Selection chemical_vat = util.select().fromTo(2, 2, 2, 4, 3, 4); + Selection mixer = util.select().fromTo(3, 4, 3, 3, 4, 3); + + Selection truss = util.select().fromTo(2, 1, 2, 2, 1, 2) + .add(util.select().fromTo(4, 1, 4, 4, 1, 4)) + .add(util.select().fromTo(4, 1, 2, 4, 1, 2)) + .add(util.select().fromTo(2, 1, 4, 2, 1, 4)); + + ElementLink vatElement = scene.world().showIndependentSection(chemical_vat, Direction.DOWN); + scene.world().showIndependentSection(truss, Direction.UP); + scene.world().rotateSection(vatElement, 0, 180, 0, 0); + + ElementLink mixerElement = scene.world().showIndependentSection(mixer, Direction.UP); + scene.overlay().showText(50) + .attachKeyFrame() + .text("The Industrial Mixer is a machine attachment for the Chemical Vat"); + scene.idle(80); + + Vec3 mixerPos = util.vector().topOf(util.grid().at(3, 4, 3)); + scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.MIXER_BLADE)); + scene.idle(30); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("When the Mixer Blade is inserted, the vat becomes a Mixer"); + scene.idle(60); + + scene.overlay().showControls(mixerPos, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.CENTRIFUGE)); + scene.idle(30); + + scene.overlay().showText(50) + .attachKeyFrame() + .text("The Industrial Mixer can also become a Centrifuge"); + scene.idle(80); + } + + public static void electrolysis(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("electrolysis", "Electrolysis"); + scene.configureBasePlate(0, 0, 7); + scene.scaleSceneView(0.7f); + scene.showBasePlate(); + + Selection chemical_vat = util.select().fromTo(2, 2, 2, 4, 3, 4); + Selection copperElectrodes = util.select().fromTo(4, 4, 3, 4, 4, 3) + .add(util.select().fromTo(2, 4, 3, 2, 4, 3)); + + Selection truss = util.select().fromTo(2, 1, 2, 2, 1, 2) + .add(util.select().fromTo(4, 1, 4, 4, 1, 4)) + .add(util.select().fromTo(4, 1, 2, 4, 1, 2)) + .add(util.select().fromTo(2, 1, 4, 2, 1, 4)); + + ElementLink vatElement = scene.world().showIndependentSection(chemical_vat, Direction.DOWN); + scene.world().showIndependentSection(truss, Direction.DOWN); + scene.world().rotateSection(vatElement, 0, 180, 0, 0); + + ElementLink electrolyzerElement = scene.world().showIndependentSection(copperElectrodes, Direction.DOWN); + + Vec3 electrodePos1 = util.vector().topOf(util.grid().at(4, 4, 3)); + Vec3 electrodePos2 = util.vector().topOf(util.grid().at(2, 4, 3)); + scene.overlay().showControls(electrodePos1, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.COPPER_ELECTRODE)); + scene.overlay().showControls(electrodePos2, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.ZINC_ELECTRODE)); + scene.overlay().showText(60) + .attachKeyFrame() + .text("Placing 2 electrode holders with Copper or Zinc Electrodes creates an Electrolyzer"); + scene.idle(80); + } + + public static void arc_furnace(SceneBuilder builder, SceneBuildingUtil util) { + CreateSceneBuilder scene = new CreateSceneBuilder(builder); + scene.title("arc_furnace", "Arc Furnace"); + scene.configureBasePlate(0, 0, 7); + scene.scaleSceneView(0.7f); + scene.showBasePlate(); + + Selection chemical_vat = util.select().fromTo(2, 2, 2, 4, 3, 4); + Selection graphiteElectrodes = util.select().fromTo(3, 4, 2, 3, 4, 2) + .add(util.select().fromTo(4, 4, 4, 4, 4, 4)) + .add(util.select().fromTo(2, 4, 4, 2, 4, 4)); + + Selection truss = util.select().fromTo(2, 1, 2, 2, 1, 2) + .add(util.select().fromTo(4, 1, 4, 4, 1, 4)) + .add(util.select().fromTo(4, 1, 2, 4, 1, 2)) + .add(util.select().fromTo(2, 1, 4, 2, 1, 4)); + + ElementLink vatElement = scene.world().showIndependentSection(chemical_vat, Direction.DOWN); + scene.world().showIndependentSection(truss, Direction.DOWN); + scene.world().rotateSection(vatElement, 0, 180, 0, 0); + + ElementLink arcFurnaceElement = scene.world().showIndependentSection(graphiteElectrodes, Direction.DOWN); + + Vec3 furnacePos1 = util.vector().topOf(util.grid().at(4, 4, 2)); + Vec3 furnacePos2 = util.vector().topOf(util.grid().at(4, 4, 4)); + Vec3 furnacePos3 = util.vector().topOf(util.grid().at(2, 4, 4)); + scene.overlay().showControls(furnacePos1, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + scene.overlay().showControls(furnacePos2, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + scene.overlay().showControls(furnacePos3, Pointing.DOWN, 20) + .rightClick() + .withItem(new ItemStack(TFMGItems.GRAPHITE_ELECTRODE)); + + scene.overlay().showText(60) + .attachKeyFrame() + .text("3 Graphite Electrodes create an Arc Furnace"); + scene.idle(80); + } +}