Mine Factory Reloaded 集成
基本信息
| 属性 | 值 |
|---|---|
| 插件类 | mods.natura.plugins.minefactoryreloaded.MFRPulse(22 行) |
| 实际注册 | mods.natura.plugins.minefactoryreloaded.MRFRegistering(107 行) |
@Pulse id |
"Natura MFR Compatibility" |
modsRequired |
"MineFactoryReloaded"(MFRPulse.java:13) |
| 发送方式 | powercrystals.minefactoryreloaded.api.FactoryRegistry.sendMessage(<类型>, <数据>) |
| 注册条数 | 30 处 FactoryRegistry 调用(grep -c 'FactoryRegistry' MRFRegistering.java) |
| 异常处理 | 捕获 Throwable,仅 logger.warn("Something went wrong in Natura plugin MineFactoryReloaded.", t)(MFRPulse.java:17-19) |
功能
把 Natura 的树木、植物与作物注册进 MFR 的 Factory Registry,让 MFR 的收割机(Harvester)、种植机(Planter)与施肥器(Fertilizer)能直接处理 Natura 的内容。
MFRPulse.init() 只做一件事:在 try/catch 中调用 MRFRegistering.registerWithMFR()(MFRPulse.java:15-18)。真正的注册全在 MRFRegistering 里,4 个注册通道以字符串常量声明(:22-25):registerPlantable、registerHarvestable、registerFertilizable、registerSludgeDrop。
一、registerHarvestable(17 条)
| 目标 | HarvestType | 条件 |
|---|---|---|
netherBerryBush → netherBerryItem |
HarvestableNaturaBerry |
PHNatura.enableNetherBerryBushes |
berryBush → berryItem |
HarvestableNaturaBerry |
PHNatura.enableBerryBushes |
bluebells |
Normal |
无条件 |
glowshroom / glowshroomBlue / glowshroomGreen / glowshroomPurple |
Normal |
无条件(4 条) |
crops → plantItem |
HarvestableNaturaCropPlant |
无条件 |
tree / rareTree / darkTree / redwood / willow |
Tree |
无条件(5 条) |
bloodwood |
TreeFlipped |
无条件 |
thornVines / rareLeaves / darkLeaves / floraLeaves / floraLeavesNoColor |
HarvestableNaturaTreeLeaves |
无条件(5 条) |
[!NOTE]
bloodwood是唯一用TreeFlipped而非Tree的树种,对应它 2×2 的原木结构。
二、registerPlantable(5 条)
| 目标 | 类 | 条件 |
|---|---|---|
netherBerryBush |
PlantableNaturaNetherBerry |
PHNatura.enableNetherBerryBushes |
berryBush |
PlantableNaturaBerry |
PHNatura.enableBerryBushes |
seeds → crops |
PlantableNaturaCrop |
无条件 |
seedFood → saguaro |
PlantableStandard |
无条件 |
floraSapling |
PlantableStandard |
无条件 |
三、registerFertilizable(3 条)
| 目标 | 类 |
|---|---|
crops |
FertilizableNaturaCrop |
floraSapling |
FertilizableSapling |
rareSapling |
FertilizableSapling |
四、registerSludgeDrop(2 条)
污泥锅炉把污泥煮成泥土类物品,Natura 往里加了两样(MRFRegistering.java:98-106):
| 物品 | value |
|---|---|
NContent.heatSand |
5 |
NContent.taintedSoil |
5 |
两者都先用 new ItemStack(...).writeToNBT(nbt) 取得物品 NBT,再补一个 value 整数字段后发送。
辅助类
plugins/minefactoryreloaded/ 下另有 10 个辅助类,按注册通道分三个子包:
| 子包 | 类 |
|---|---|
fertilizables/ |
FertilizableNaturaCrop、FertilizableSapling |
harvestables/ |
HarvestableNaturaBerry、HarvestableNaturaCropPlant、HarvestableNaturaTreeLeaves、HarvestableStandard |
plantables/ |
PlantableNaturaBerry、PlantableNaturaCrop、PlantableNaturaNetherBerry、PlantableStandard |
相关条目
- 兼容插件体系 - 9 个插件的注册总表
- Natura 木材与树木 - 被登记为
Tree的 5 种树 - 浆果丛 / 下界浆果丛 - 可种植可收割的浆果
- 发光蘑菇 - 4 个
Normal收割目标