Skip to content

Commit c9b1cd2

Browse files
committed
feat:添加了魔力凝聚仓的思索
1 parent 9a9b11d commit c9b1cd2

9 files changed

Lines changed: 204 additions & 2 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,11 @@ forge*changelog.txt
2727
src/generated/resources/.cache/*
2828
src/test/*
2929

30+
# OpenCode AI orchestrator config & skills
31+
.opencode/
32+
33+
# OMO
34+
.omo
35+
3036
# macOS
3137
.DS_Store

src/generated/resources/assets/ctnhcore/lang/en_ud.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,14 @@
615615
"ctnhcore.ponder.carbon_brushes.text_8": "uoıʇdɯnsuoɔ ssǝɹʇs uı ǝsɐǝɹɔuı ǝɥʇ oʇ ɹoʇnqıɹʇuoɔ ɹoظɐɯ ɐ osןɐ sı pǝǝds ןɐuoıʇɐʇoɹ ǝɥ⟘",
616616
"ctnhcore.ponder.carbon_brushes.text_9": "˙uoıʇdɯnsuoɔ ssǝɹʇs ǝsɐǝɹɔuı osןɐ ןןıʍ ʇǝubɐɯ ǝɥʇ ɟo ǝpɐɹb ǝɥ⟘ 'ʎןɹɐןıɯıS",
617617
"ctnhcore.ponder.carbon_brushes.title": "sǝɥsnɹᗺ uoqɹɐƆ",
618+
"ctnhcore.ponder.manahatch.header": "ɥɔʇɐH ɐuɐW",
619+
"ctnhcore.ponder.manahatch.text_1": "ɥɔʇɐH ɐuɐW ǝɥʇ ʎq pǝpıʌoɹd sı sǝuıɥɔɐɯ ɐuɐɯ ǝbɹɐן ɹoɟ pǝɹınbǝɹ ʎbɹǝuǝ ɐuɐɯ ǝɥ⟘",
620+
"ctnhcore.ponder.manahatch.text_2": "ʎbɹǝuǝ ɐuɐɯ oʇuı ɐuɐɯ ɐıuɐʇoᗺ buıɯoɔuı ʇɹǝʌuoɔ ʎןןɐɔıʇɐɯoʇnɐ uɐɔ ɥɔʇɐɥ ǝɥ⟘",
621+
"ctnhcore.ponder.manahatch.text_3": "ʎbɹǝuǝ ɐuɐɯ oʇuı ɐuɐɯ pınbıן ɹo ԀꞀ buıɯoɔuı ʇɹǝʌuoɔ osןɐ uɐɔ ʇI",
622+
"ctnhcore.ponder.manahatch.text_4": "sǝuıɥɔɐɯ ɐuɐɯ ʇuǝɔɐظpɐ oʇ pǝıןddns sı ʎbɹǝuǝ ɐuɐɯ pǝʇɹǝʌuoɔ ǝɥ⟘",
623+
"ctnhcore.ponder.manahatch.text_5": "˙I∩ ʞɔoןq uıɐɯ ǝɥʇ oʇuı ǝpɐɹbdn ǝuıɥɔɐɯ ɔıbɐɯ ǝɥʇ ʇnԀ",
624+
"ctnhcore.ponder.manahatch.text_6": "ʎʇıɔɐdɐɔ s,ɥɔʇɐɥ ǝɥʇ uo pǝsɐq sʇɔǝɟɟǝ uoıʇɐɔıɟıןdɯɐ ǝpıʌoɹd sǝpɐɹbdn ǝuıɥɔɐɯ ɐuɐW",
625+
"ctnhcore.ponder.manahatch.title": "ɥɔʇɐH ɐuɐW",
618626
"ctnhcore.ponder.meadow_common.header": "ʍopɐǝW pןınq oʇ ʍoH",
619627
"ctnhcore.ponder.meadow_common.text_1": "ʞɔoןq uıɐɯ ʍopɐǝɯ ɐ pǝǝu noʎ 'ʇsɹıℲ",
620628
"ctnhcore.ponder.meadow_common.text_10": "sbbǝ sı suǝʞɔıɥɔ ɟo ʇndʇno ǝɥ⟘",

src/generated/resources/assets/ctnhcore/lang/en_us.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,14 @@
615615
"ctnhcore.ponder.carbon_brushes.text_8": "The rotational speed is also a major contributor to the increase in stress consumption",
616616
"ctnhcore.ponder.carbon_brushes.text_9": "Similarly, The grade of the magnet will also increase stress consumption.",
617617
"ctnhcore.ponder.carbon_brushes.title": "Carbon Brushes",
618+
"ctnhcore.ponder.manahatch.header": "Mana Hatch",
619+
"ctnhcore.ponder.manahatch.text_1": "The mana energy required for large mana machines is provided by the Mana Hatch",
620+
"ctnhcore.ponder.manahatch.text_2": "The hatch can automatically convert incoming Botania mana into mana energy",
621+
"ctnhcore.ponder.manahatch.text_3": "It can also convert incoming LP or liquid mana into mana energy",
622+
"ctnhcore.ponder.manahatch.text_4": "The converted mana energy is supplied to adjacent mana machines",
623+
"ctnhcore.ponder.manahatch.text_5": "Put the magic machine upgrade into the main block UI.",
624+
"ctnhcore.ponder.manahatch.text_6": "Mana machine upgrades provide amplification effects based on the hatch's capacity",
625+
"ctnhcore.ponder.manahatch.title": "Mana Hatch",
618626
"ctnhcore.ponder.meadow_common.header": "How to build Meadow",
619627
"ctnhcore.ponder.meadow_common.text_1": "First, you need a meadow main block",
620628
"ctnhcore.ponder.meadow_common.text_10": "The output of chickens is eggs",

src/generated/resources/assets/ctnhcore/lang/zh_cn.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,14 @@
838838
"ctnhcore.ponder.carbon_brushes.text_8": "转速也是应力消耗增加的一个重要因素",
839839
"ctnhcore.ponder.carbon_brushes.text_9": "同样,磁铁的等级也会增加应力消耗。",
840840
"ctnhcore.ponder.carbon_brushes.title": "碳刷",
841+
"ctnhcore.ponder.manahatch.header": "魔力凝聚仓",
842+
"ctnhcore.ponder.manahatch.text_1": "魔力大机器运行所需的魔力能量由魔力凝聚仓提供",
843+
"ctnhcore.ponder.manahatch.text_2": "凝聚仓可以将输入的植物魔法魔力自动转化为魔力能量",
844+
"ctnhcore.ponder.manahatch.text_3": "也可以将输入的LP魔力或液态魔力转化为魔力能量",
845+
"ctnhcore.ponder.manahatch.text_4": "转化得到的魔力能量将供给所属的魔力机器使用",
846+
"ctnhcore.ponder.manahatch.text_5": "将魔力机器升级放入主方块UI中",
847+
"ctnhcore.ponder.manahatch.text_6": "魔力机器升级会基于凝聚仓的容量提供增幅效果",
848+
"ctnhcore.ponder.manahatch.title": "魔力凝聚仓",
841849
"ctnhcore.ponder.meadow_common.header": "如何搭建牧场",
842850
"ctnhcore.ponder.meadow_common.text_1": "首先,你需要一个牧场主方块",
843851
"ctnhcore.ponder.meadow_common.text_10": "鸡的产出是鸡蛋",

src/main/java/io/github/cpearl0/ctnhcore/client/ponder/CTNHPonderScenes.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import io.github.cpearl0.ctnhcore.CTNHCore;
44
import io.github.cpearl0.ctnhcore.client.ponder.Electric.CarbonBrushes;
55
import io.github.cpearl0.ctnhcore.client.ponder.Kinetic.*;
6+
import io.github.cpearl0.ctnhcore.client.ponder.Mana.ManaHatch;
67
import io.github.cpearl0.ctnhcore.client.ponder.Mana.MysticSpire;
78
import io.github.cpearl0.ctnhcore.registry.machines.multiblock.MultiblocksA;
89

@@ -42,6 +43,22 @@ public static void register(PonderSceneRegistrationHelper<ResourceLocation> help
4243
.addStoryBoard("mysticspire/scene2", MysticSpire::Scene2, CTNHPonderTags.Mana)
4344
.addStoryBoard("mysticspire/scene3", MysticSpire::Scene3, CTNHPonderTags.Mana);
4445

46+
// 魔力凝聚仓思索 —— 所有含 manahatch 的方块共用同一组故事板
47+
ResourceLocation[] manahatchBlocks = {
48+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "manahatch"),
49+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "elf_manahatch"),
50+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "giga_manahatch"),
51+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "sky_manahatch"),
52+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "industry_manahatch"),
53+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "bloodmanahatch"),
54+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "soulmanahatch"),
55+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "creative_manahatch")
56+
};
57+
for (var blockId : manahatchBlocks) {
58+
helper.forComponents(blockId)
59+
.addStoryBoard("manahatch/scene", ManaHatch::Common, CTNHPonderTags.Mana);
60+
}
61+
4562
CTNHCore.LOGGER.info("Ponder scenes initialized");
4663
}
4764
}

src/main/java/io/github/cpearl0/ctnhcore/client/ponder/CTNHPonderTags.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ public static void register(PonderTagRegistrationHelper<ResourceLocation> helper
4545
.add(CTPPMachines.CARBON_BRUSHES.getId());
4646

4747
helper.addToTag(Mana)
48-
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "mystic_spire"));
48+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "mystic_spire"))
49+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "manahatch"))
50+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "elf_manahatch"))
51+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "giga_manahatch"))
52+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "sky_manahatch"))
53+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "industry_manahatch"))
54+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "bloodmanahatch"))
55+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "soulmanahatch"))
56+
.add(ResourceLocation.fromNamespaceAndPath("ctnhmana", "creative_manahatch"));
4957

5058
CTNHCore.LOGGER.info("Ponder tags initialized");
5159
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
package io.github.cpearl0.ctnhcore.client.ponder.Mana;
2+
3+
import io.github.cpearl0.ctnhcore.client.ponder.CTNHPonderSceneBuilder;
4+
5+
import net.createmod.catnip.math.Pointing;
6+
import net.createmod.ponder.api.scene.SceneBuilder;
7+
import net.createmod.ponder.api.scene.SceneBuildingUtil;
8+
import net.minecraft.core.Direction;
9+
import net.minecraft.resources.ResourceLocation;
10+
import net.minecraft.world.item.Item;
11+
import net.minecraft.world.item.ItemStack;
12+
import net.minecraft.world.phys.Vec3;
13+
import net.minecraftforge.registries.ForgeRegistries;
14+
15+
import com.ctnhlang.CN;
16+
import com.ctnhlang.EN;
17+
import com.ctnhlang.Key;
18+
import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang;
19+
import vazkii.botania.common.entity.BotaniaEntities;
20+
21+
public class ManaHatch {
22+
23+
private ManaHatch() {}
24+
25+
// ========== 魔力凝聚仓(合并场景) ==========
26+
@Key("ctnhcore.ponder.manahatch.title")
27+
@CN("魔力凝聚仓")
28+
@EN("Mana Hatch")
29+
static Lang Title;
30+
@Key("ctnhcore.ponder.manahatch.header")
31+
@CN("魔力凝聚仓")
32+
@EN("Mana Hatch")
33+
static Lang Header;
34+
@Key("ctnhcore.ponder.manahatch.text_1")
35+
@CN("魔力大机器运行所需的魔力能量由魔力凝聚仓提供")
36+
@EN("The mana energy required for large mana machines is provided by the Mana Hatch")
37+
static Lang Text1;
38+
@Key("ctnhcore.ponder.manahatch.text_2")
39+
@CN("凝聚仓可以将输入的植物魔法魔力自动转化为魔力能量")
40+
@EN("The hatch can automatically convert incoming Botania mana into mana energy")
41+
static Lang Text2;
42+
@Key("ctnhcore.ponder.manahatch.text_3")
43+
@CN("也可以将输入的LP魔力或液态魔力转化为魔力能量")
44+
@EN("It can also convert incoming LP or liquid mana into mana energy")
45+
static Lang Text3;
46+
@Key("ctnhcore.ponder.manahatch.text_4")
47+
@CN("转化得到的魔力能量将供给所属的魔力机器使用")
48+
@EN("The converted mana energy is supplied to adjacent mana machines")
49+
static Lang Text4;
50+
@Key("ctnhcore.ponder.manahatch.text_5")
51+
@CN("将魔力机器升级放入主方块UI中")
52+
@EN("Put the magic machine upgrade into the main block UI.")
53+
static Lang Text5;
54+
@Key("ctnhcore.ponder.manahatch.text_6")
55+
@CN("魔力机器升级会基于凝聚仓的容量提供增幅效果")
56+
@EN("Mana machine upgrades provide amplification effects based on the hatch's capacity")
57+
static Lang Text6;
58+
59+
// ============================================================
60+
// 合并场景:魔力凝聚仓 — 输入、供能与升级
61+
// 对应 NBT: assets/ctnhcore/ponder/manahatch/scene.nbt (16x13x16)
62+
// 关键方块:
63+
// creative_pool (5, 1, 2)
64+
// giga_manahatch (7, 1, 4) ← 控制器
65+
// mana_wiremill (8, 1, 4) ← 魔力机器示例
66+
// hv_energy_input_hatch (9, 1, 4)
67+
// 魔力机器多方块 (5..11, 1..5, 5..10)
68+
// ============================================================
69+
public static void Common(SceneBuilder builder, SceneBuildingUtil util) {
70+
CTNHPonderSceneBuilder scene = new CTNHPonderSceneBuilder(builder);
71+
scene.setSceneOffsetY(-1);
72+
scene.scaleSceneView(0.4F);
73+
scene.idle(10);
74+
75+
// 关键观察点
76+
Vec3 hatchVec = util.vector().blockSurface(util.grid().at(7, 1, 4), Direction.NORTH);
77+
Vec3 hatchTop = util.vector().blockSurface(util.grid().at(7, 1, 4), Direction.UP);
78+
Vec3 poolVec = util.vector().blockSurface(util.grid().at(5, 1, 2), Direction.UP);
79+
Vec3 wiremillVec = util.vector().blockSurface(util.grid().at(8, 1, 4), Direction.UP);
80+
81+
// 1. 显示地面层
82+
scene.world().showSection(util.select().layer(0), Direction.NORTH);
83+
scene.idle(10);
84+
85+
// 2. 显示魔力凝聚仓 + 介绍
86+
scene.world().showSection(util.select().position(7, 1, 4), Direction.DOWN);
87+
scene.title("manahatch");
88+
scene.idle(20);
89+
scene.showText(60)
90+
.pointAt(hatchVec)
91+
.attachKeyFrame();
92+
scene.idle(70);
93+
94+
// 3. 展示 Botania 魔力输入:创造魔力池 + Spark + 流向凝聚仓的粒子
95+
scene.world().showSection(util.select().position(5, 1, 2), Direction.DOWN);
96+
scene.idle(10);
97+
scene.world().createEntity(world -> {
98+
var spark = BotaniaEntities.SPARK.create(world);
99+
spark.setPos(5.5, 2.5, 2.5);
100+
spark.setYRot(0);
101+
return spark;
102+
});
103+
scene.idle(10);
104+
PonderParticleUtil.sparkManaFlow(scene.effects(), poolVec, hatchVec, 160);
105+
scene.showText(60)
106+
.pointAt(poolVec)
107+
.attachKeyFrame();
108+
scene.idle(80);
109+
110+
// 4. 展示 LP/液态魔力转化(指向凝聚仓本体说明)
111+
scene.showText(60)
112+
.pointAt(hatchVec)
113+
.attachKeyFrame();
114+
scene.idle(70);
115+
116+
// 5. 展示魔力机器获取能量:魔力机器 + 能源仓 + 多方块结构
117+
scene.world().showSection(util.select().position(8, 1, 4), Direction.DOWN);
118+
scene.idle(5);
119+
scene.world().showSection(util.select().position(9, 1, 4), Direction.DOWN);
120+
scene.idle(5);
121+
scene.world().showSection(util.select().fromTo(5, 1, 5, 11, 5, 10), Direction.DOWN);
122+
scene.idle(20);
123+
scene.showText(60)
124+
.pointAt(wiremillVec)
125+
.attachKeyFrame();
126+
scene.idle(80);
127+
128+
// 6. 展示升级符文放入主方块 UI
129+
Item upgradeRune = ForgeRegistries.ITEMS.getValue(
130+
ResourceLocation.fromNamespaceAndPath("ctnhmana", "clear_sky_flower_wish"));
131+
ItemStack upgradeStack = new ItemStack(upgradeRune);
132+
scene.overlay().showControls(wiremillVec, Pointing.DOWN, 60)
133+
.withItem(upgradeStack)
134+
.rightClick();
135+
scene.showText(60)
136+
.pointAt(wiremillVec)
137+
.attachKeyFrame();
138+
scene.idle(70);
139+
140+
// 7. 升级基于容量提供增幅
141+
scene.showText(60)
142+
.pointAt(hatchVec)
143+
.attachKeyFrame();
144+
scene.idle(70);
145+
146+
scene.markAsFinished();
147+
}
148+
}

src/main/java/io/github/cpearl0/ctnhcore/common/CommonProxy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,4 @@ packOutput, registries, new RegistrySetBuilder()
137137
set));
138138
}
139139
}
140-
141140
}
10 KB
Binary file not shown.

0 commit comments

Comments
 (0)