|
| 1 | +package plus.dragons.createenchantmentindustry.client.ponder.scene; |
| 2 | + |
| 3 | +import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity; |
| 4 | +import com.simibubi.create.content.processing.basin.BasinBlockEntity; |
| 5 | +import com.simibubi.create.foundation.ponder.CreateSceneBuilder; |
| 6 | +import net.createmod.catnip.math.Pointing; |
| 7 | +import net.createmod.ponder.api.scene.SceneBuilder; |
| 8 | +import net.createmod.ponder.api.scene.SceneBuildingUtil; |
| 9 | +import net.minecraft.core.Direction; |
| 10 | +import net.minecraft.world.item.DyeColor; |
| 11 | +import net.neoforged.neoforge.fluids.FluidStack; |
| 12 | +import net.neoforged.neoforge.fluids.capability.IFluidHandler; |
| 13 | +import plus.dragons.createdragonsplus.common.registry.CDPFluids; |
| 14 | +import plus.dragons.createenchantmentindustry.common.registry.CEIFluids; |
| 15 | + |
| 16 | +public class MiscScene { |
| 17 | + public static void experienceHatch(SceneBuilder builder, SceneBuildingUtil util) { |
| 18 | + CreateSceneBuilder scene = new CreateSceneBuilder(builder); |
| 19 | + scene.title("basic", "Introduction to Experience Hatch"); |
| 20 | + scene.configureBasePlate(0, 0, 4); |
| 21 | + scene.showBasePlate(); |
| 22 | + scene.idle(5); |
| 23 | + scene.world().showSection(util.select().fromTo(3, 1, 1, 1, 1, 3), Direction.DOWN); |
| 24 | + scene.world().showSection(util.select().fromTo(3, 2, 2, 2, 3, 3), Direction.DOWN); |
| 25 | + scene.world().showSection(util.select().position(1, 3, 2), Direction.DOWN); |
| 26 | + scene.idle(5); |
| 27 | + |
| 28 | + scene.overlay().showText(50) |
| 29 | + .text("It is very simple to use. Right click Hatch to store Experience...") |
| 30 | + .placeNearTarget() |
| 31 | + .pointAt(util.vector().centerOf(1, 3, 2)); |
| 32 | + var frontVec = util.vector().blockSurface(util.grid().at(2,3,2), Direction.WEST) |
| 33 | + .add(-.125, 0, 0); |
| 34 | + scene.overlay().showControls(frontVec, Pointing.UP, 50).rightClick(); |
| 35 | + scene.idle(10); |
| 36 | + scene.world().modifyBlockEntity(util.grid().at(2, 3, 2), FluidTankBlockEntity.class, |
| 37 | + be -> be.getControllerBE().getTankInventory().fill(new FluidStack(CEIFluids.EXPERIENCE.get(), 10000), IFluidHandler.FluidAction.EXECUTE)); |
| 38 | + scene.idle(40); |
| 39 | + |
| 40 | + scene.world().modifyBlockEntity(util.grid().at(3, 2, 1), BasinBlockEntity.class, |
| 41 | + be -> be.inputTank.getPrimaryHandler().fill(new FluidStack(CEIFluids.EXPERIENCE.get(), 1000), IFluidHandler.FluidAction.EXECUTE)); |
| 42 | + scene.idle(10); |
| 43 | + scene.world().showSection(util.select().fromTo(3, 2, 1, 2, 2, 1), Direction.UP); |
| 44 | + scene.idle(5); |
| 45 | + scene.overlay().showText(60) |
| 46 | + .text("...Shift-Right-Click Hatch to extract stored Experience") |
| 47 | + .placeNearTarget() |
| 48 | + .pointAt(util.vector().centerOf(2, 2, 1)); |
| 49 | + frontVec = util.vector().blockSurface(util.grid().at(3,2,1), Direction.WEST) |
| 50 | + .add(-.125, 0, 0); |
| 51 | + scene.overlay().showControls(frontVec, Pointing.UP, 50).rightClick(); |
| 52 | + scene.idle(30); |
| 53 | + scene.world().modifyBlockEntity(util.grid().at(3, 2, 1), BasinBlockEntity.class, |
| 54 | + be -> be.inputTank.getPrimaryHandler().drain(new FluidStack(CEIFluids.EXPERIENCE.get(), 1000), IFluidHandler.FluidAction.EXECUTE)); |
| 55 | + scene.idle(30); |
| 56 | + |
| 57 | + scene.overlay().showText(55) |
| 58 | + .text("There are a filter slot and a scroll panel on Hatch. You can configure how much Experience per interaction on the panel") |
| 59 | + .attachKeyFrame() |
| 60 | + .placeNearTarget() |
| 61 | + .pointAt(util.vector().centerOf(1, 3, 2)); |
| 62 | + for(int i=0;i<12;i++){ |
| 63 | + scene.world().modifyBlockEntity(util.grid().at(2, 3, 2), FluidTankBlockEntity.class, |
| 64 | + be -> be.getControllerBE().getTankInventory().fill(new FluidStack(CEIFluids.EXPERIENCE.get(), 1000), IFluidHandler.FluidAction.EXECUTE)); |
| 65 | + scene.idle(5); |
| 66 | + } |
| 67 | + |
| 68 | + scene.overlay().showText(40) |
| 69 | + .text("The filter slot is used to deal with experience fluids of other mods") |
| 70 | + .attachKeyFrame() |
| 71 | + .placeNearTarget() |
| 72 | + .pointAt(util.vector().centerOf(1, 3, 2)); |
| 73 | + scene.idle(30); |
| 74 | + scene.world().showSection(util.select().position(0, 1, 1), Direction.DOWN); |
| 75 | + scene.idle(10); |
| 76 | + |
| 77 | + scene.world().modifyBlockEntity(util.grid().at(1, 1, 1), FluidTankBlockEntity.class, |
| 78 | + be -> be.getControllerBE().getTankInventory().fill(new FluidStack(CDPFluids.DYES_BY_COLOR.get(DyeColor.CYAN).get(), 36000), IFluidHandler.FluidAction.EXECUTE)); |
| 79 | + scene.idle(10); |
| 80 | + scene.overlay().showText(40) |
| 81 | + .text("Let's assume that Liquid Cyan Dye is experience fluid from another mod...") |
| 82 | + .placeNearTarget() |
| 83 | + .pointAt(util.vector().centerOf(0, 1, 1)); |
| 84 | + scene.idle(40); |
| 85 | + scene.overlay().showText(40) |
| 86 | + .text("...And place Bucket Cyan Dye in filter slot") |
| 87 | + .placeNearTarget() |
| 88 | + .pointAt(util.vector().centerOf(0, 1, 1)); |
| 89 | + scene.overlay().showControls(util.vector().centerOf(0, 1, 1), Pointing.DOWN, 40).withItem(CDPFluids.DYES_BY_COLOR.get(DyeColor.CYAN).getBucket().get().getDefaultInstance()); |
| 90 | + scene.idle(40); |
| 91 | + |
| 92 | + scene.overlay().showText(60) |
| 93 | + .text("Now, you can directly save and extract your experience as 'The Cyan Experience'!") |
| 94 | + .placeNearTarget() |
| 95 | + .pointAt(util.vector().centerOf(0, 1, 1)); |
| 96 | + for(int i=0;i<12;i++){ |
| 97 | + scene.world().modifyBlockEntity(util.grid().at(1, 1, 1), FluidTankBlockEntity.class, |
| 98 | + be -> be.getControllerBE().getTankInventory().drain(new FluidStack(CDPFluids.DYES_BY_COLOR.get(DyeColor.CYAN).get(), 3000), IFluidHandler.FluidAction.EXECUTE)); |
| 99 | + scene.idle(5); |
| 100 | + } |
| 101 | + } |
| 102 | +} |
0 commit comments