Skip to content

Commit cd39563

Browse files
[update] Ponder for Exp Hatch
1 parent 799856d commit cd39563

File tree

6 files changed

+114
-17
lines changed

6 files changed

+114
-17
lines changed

src/main/java/plus/dragons/createenchantmentindustry/client/ponder/CEIPonderPlugin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import net.createmod.ponder.api.registration.PonderSceneRegistrationHelper;
2323
import net.createmod.ponder.api.registration.PonderTagRegistrationHelper;
2424
import net.minecraft.resources.ResourceLocation;
25-
import plus.dragons.createenchantmentindustry.client.ponder.scene.CEIPonderTags;
2625
import plus.dragons.createenchantmentindustry.common.CEICommon;
2726

2827
public class CEIPonderPlugin implements PonderPlugin {
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
package plus.dragons.createenchantmentindustry.client.ponder;
22

3-
import com.simibubi.create.AllBlocks;
43
import com.simibubi.create.AllItems;
54
import com.tterrag.registrate.util.entry.ItemProviderEntry;
65
import com.tterrag.registrate.util.entry.RegistryEntry;
76
import net.createmod.ponder.api.registration.PonderSceneRegistrationHelper;
87
import net.minecraft.resources.ResourceLocation;
9-
import plus.dragons.createenchantmentindustry.client.ponder.scene.CEIPonderTags;
108
import plus.dragons.createenchantmentindustry.client.ponder.scene.ExperienceScene;
9+
import plus.dragons.createenchantmentindustry.client.ponder.scene.MiscScene;
10+
import plus.dragons.createenchantmentindustry.common.registry.CEIBlocks;
1111

1212
public class CEIPonderScenes {
1313
public static void register(PonderSceneRegistrationHelper<ResourceLocation> helper) {
1414
PonderSceneRegistrationHelper<ItemProviderEntry<?, ?>> HELPER = helper.withKeyFunction(RegistryEntry::getId);
1515

16-
HELPER.forComponents(AllItems.EXP_NUGGET, AllBlocks.EXPERIENCE_BLOCK)
16+
HELPER.forComponents(AllItems.EXP_NUGGET)
1717
.addStoryBoard("experience/basic", ExperienceScene::basic, CEIPonderTags.EXPERIENCE_RELATED)
1818
.addStoryBoard("experience/advance", ExperienceScene::advance, CEIPonderTags.SUPER_EXPERIENCE_RELATED)
1919
.addStoryBoard("experience/prepare_for_super_enchant",ExperienceScene::prepare);
20+
21+
22+
HELPER.forComponents(CEIBlocks.EXPERIENCE_HATCH)
23+
.addStoryBoard("experience_hatch", MiscScene::experienceHatch, CEIPonderTags.EXPERIENCE_RELATED);
2024
}
2125
}

src/main/java/plus/dragons/createenchantmentindustry/client/ponder/scene/CEIPonderTags.java renamed to src/main/java/plus/dragons/createenchantmentindustry/client/ponder/CEIPonderTags.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package plus.dragons.createenchantmentindustry.client.ponder.scene;
1+
package plus.dragons.createenchantmentindustry.client.ponder;
22

33
import com.simibubi.create.AllBlocks;
44
import com.simibubi.create.AllItems;
@@ -19,14 +19,14 @@ public static void register(PonderTagRegistrationHelper<ResourceLocation> helper
1919

2020
helper.registerTag(EXPERIENCE_RELATED)
2121
.addToIndex()
22-
.item(AllItems.EXP_NUGGET.get(), true, false)
22+
.item(AllBlocks.EXPERIENCE_BLOCK.get(), true, false)
2323
.title("Experience Related")
2424
.description("Things that will be used when processing and applying Experience")
2525
.register();
2626

2727
helper.registerTag(SUPER_EXPERIENCE_RELATED)
2828
.addToIndex()
29-
.item(CEIItems.SUPER_EXPERIENCE_NUGGET.get(), true, false)
29+
.item(CEIBlocks.SUPER_EXPERIENCE_BLOCK.get(), true, false)
3030
.title("Super Experience Related")
3131
.description("Things that will be used when processing and applying Super Experience")
3232
.register();

src/main/java/plus/dragons/createenchantmentindustry/client/ponder/scene/ExperienceScene.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public static void basic(SceneBuilder builder, SceneBuildingUtil util) {
8181
scene.idle(5);
8282
scene.overlay().showText(40)
8383
.text("Liquid Hatch for accessing liquids directly from items")
84-
.attachKeyFrame()
8584
.placeNearTarget()
8685
.pointAt(util.vector().centerOf(11, 4, 8));
8786
scene.overlay().showOutline(PonderPalette.GREEN, liquidHatch, liquidHatch, 40);
@@ -92,7 +91,6 @@ public static void basic(SceneBuilder builder, SceneBuildingUtil util) {
9291
scene.idle(5);
9392
scene.overlay().showText(40)
9493
.text("Experience Hatch for accessing experience directly from the player.")
95-
.attachKeyFrame()
9694
.placeNearTarget()
9795
.pointAt(util.vector().centerOf(8, 4, 11));
9896
scene.overlay().showOutline(PonderPalette.GREEN, expHatch, expHatch, 40);
@@ -117,7 +115,6 @@ public static void basic(SceneBuilder builder, SceneBuildingUtil util) {
117115

118116
scene.overlay().showText(50)
119117
.text("You can use Item Drain to pour Liquid Experience out of items")
120-
.attachKeyFrame()
121118
.placeNearTarget()
122119
.pointAt(util.vector().topOf(9, 2, 2));
123120
scene.overlay().showOutline(PonderPalette.GREEN, itemDrain, itemDrain, 50);
@@ -139,7 +136,6 @@ public static void basic(SceneBuilder builder, SceneBuildingUtil util) {
139136
scene.world().showSection(grindStoneDrain, Direction.DOWN);
140137
scene.overlay().showText(60)
141138
.text("You can also use Mechanical GrindStone to pulverize items like Experience Nuggets into Liquid Experience")
142-
.attachKeyFrame()
143139
.placeNearTarget()
144140
.pointAt(util.vector().topOf(9, 3, 4));
145141
scene.overlay().showOutline(PonderPalette.GREEN, grindStoneDrain, grindStoneDrain, 60);
@@ -315,13 +311,13 @@ public static void basic(SceneBuilder builder, SceneBuildingUtil util) {
315311
scene.idle(20);
316312

317313
// leak
314+
scene.addKeyframe();
318315
scene.world().showSection(util.select().fromTo(4, 7,9,8,7,11), Direction.EAST);
319316
scene.world().setKineticSpeed(util.select().position(8, 7, 11), 256f);
320317
scene.world().propagatePipeChange(util.grid().at(8, 7, 11));
321-
scene.idle(5);
318+
scene.idle(40);
322319
scene.overlay().showText(60)
323320
.text("Don't worry, leaked Liquid Experience will turn into experience orbs")
324-
.attachKeyFrame()
325321
.placeNearTarget()
326322
.pointAt(util.vector().centerOf(4, 7, 9));
327323
scene.idle(65);
@@ -338,7 +334,6 @@ public static void advance(SceneBuilder builder, SceneBuildingUtil util) {
338334
scene.idle(5);
339335
scene.overlay().showText(50)
340336
.text("You need to know a few more things before you're ready to start working on enchantments")
341-
.attachKeyFrame()
342337
.placeNearTarget()
343338
.pointAt(util.vector().topOf(4, 1, 0));
344339
for(int i=0;i<=4;i++){
@@ -351,7 +346,6 @@ public static void advance(SceneBuilder builder, SceneBuildingUtil util) {
351346
scene.idle(5);
352347
scene.overlay().showText(55)
353348
.text("Block of Experience is no longer purely decorative and storage block. You'll need it later")
354-
.attachKeyFrame()
355349
.placeNearTarget()
356350
.pointAt(util.vector().topOf(2, 1, 0));
357351
scene.overlay().showOutline(PonderPalette.GREEN, util.select().fromTo(4,1,0,0,1,1), util.select().fromTo(4,1,0,0,1,1), 55);
@@ -365,7 +359,6 @@ public static void advance(SceneBuilder builder, SceneBuildingUtil util) {
365359
}
366360
scene.overlay().showText(40)
367361
.text("This is Block of Super Experience. You'll need it for Super Enchanting")
368-
.attachKeyFrame()
369362
.placeNearTarget()
370363
.pointAt(util.vector().topOf(2, 2, 3));
371364
scene.overlay().showOutline(PonderPalette.BLUE, util.select().fromTo(4,1,3,0,2,4), util.select().fromTo(4,1,3,0,2,4), 40);
@@ -437,7 +430,6 @@ public static void prepare(SceneBuilder builder, SceneBuildingUtil util) {
437430
scene.idle(5);
438431
scene.overlay().showText(50)
439432
.text("Lighting Strike!")
440-
.attachKeyFrame()
441433
.placeNearTarget()
442434
.pointAt(util.vector().topOf(1, 2, 1));
443435
scene.idle(50);
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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+
}
Binary file not shown.

0 commit comments

Comments
 (0)