Forestry 集成
基本信息
| 属性 | 值 |
|---|---|
| 实现包 | pl.asie.computronics.integration.forestry(+ entity / nanomachines / client 子包) |
| 版本要求 | Mods.Versions.Forestry = "[4.2.0,)"(Mods.java:38) |
| 编译依赖 | com.github.GTNewHorizons:gendustry:1.9.9-GTNH:dev(dependencies.gradle:12) |
| 激活 | Mods.hasVersion(Mods.Forestry, "[4.2.0,)")(IntegrationOpenComputers.java:153) |
| 开关 | enable.forestry.opencomputersBees,默认 true(Config.java:328-332) |
⚠️ 编译依赖写的是 gendustry(GT5 时期),不是 Forestry 本身(dependencies.gradle:12)。这是上游 fork 的历史遗留,运行时实际检测的 modid 是 Forestry。
蜂种注册
IntegrationForestry.initOC(IntegrationForestry.java:94 起)创建一个完整的新蜂种分支:
| 项目 | 内容 | 来源 |
|---|---|---|
| 分类 | pirates / 显示名 Piraticus |
IntegrationForestry.java:95 |
| 科属 | 加入 family.apidae 成员组 |
IntegrationForestry.java:96 |
| 蜂种 | 「渣渣」scummy |
zh_CN.lang computronics.bees.species.scummy |
| 花朵等位基因 | computronics.flowers.sea = 海,FlowerProviderSea |
IntegrationForestry.java:71、IntegrationForestry.java:98 |
| 交叉繁殖 | scummyA / scummyB 两个 IBeeMutationCustom |
IntegrationForestry.java:73-74 |
| 物品 | computronics.partsForestry(for.combAcid / for.dropAcid) |
IntegrationForestry.java:84-86 |
| 渲染 | SwarmTextureHandler 注册到 MinecraftForge.EVENT_BUS |
IntegrationForestry.java:87-89 |
preInitOC 整体包在 if (Mods.isLoaded(Mods.OpenComputers)) 内(IntegrationForestry.java:83)。
实体
EntitySwarm—— 蜂群实体,注册为EntityRegistry.registerModEntity(EntitySwarm.class, "swarm", 9, …)(IntegrationForestry.java:166),ID 9,跟踪范围 64,更新频率 1。SwarmProvider—— 纳米机器提供者,注册到 Forge 事件总线并Nanomachines.addProvider(provider)(IntegrationForestry.java:167-170)。注意源码里对应的一行FMLCommonHandler.instance().bus().register(provider)已被注释掉(IntegrationForestry.java:169),只剩 Forge 总线注册这一条生效路径。SwarmBehavior—— 实际生成蜂群实体的行为(SwarmBehavior.java:58:new EntitySwarm(player.worldObj, x, y, z, queen))。
详见 蜂群实体。
死亡信息
zh_CN.lang 定义了 6 条 death.attack.computronics.sting.* 死亡信息(sting.1 ~ sting.5 与 sting.self),由蜂群实体使用。
数值
| 数值名 | 值 | 范围 | 来源 |
|---|---|---|---|
enable.forestry.opencomputersBees |
true |
布尔 | Config.java:328-332 |
Config.FORESTRY_BEES 字段初值 |
true |
— | Config.java:48 |
版本不满足时:不改配置(保持 true),改在 IntegrationOpenComputers.java:158-163 向日志打一条 warn,提示更新 Forestry 到 4.2.0 或更高。
交互
| 触发 | 行为 |
|---|---|
| 蜂群工蜂采蜜 | 产出 computronics.partsForestry 的两个变体 |
| 玩家被蜂群蜇伤 | 触发 6 条死亡信息之一 |
相关条目
- Forestry 零件 - 蜂种的两个酿造产物
- 蜂群实体 - 实体与纳米机器提供者
- 设置:OpenComputers -
enable.forestry.opencomputersBees