Corporea 物流
基本信息
| 属性 | 值 |
|---|---|
| 抽象基类 | vazkii.botania.common.block.corporea.BlockCorporeaBase(extends BlockModContainer<TileCorporeaBase> implements ICraftAchievement) |
| 材质 | 全部为 Material.iron |
| 硬度 | 全部为 5.5 |
| 具体方块 | 5 个 + 1 个直接继承 BlockModContainer 的特类 |
| TileEntity | 6 个,位于 common/block/tile/corporea/ |
| 配套实体 | EntityCorporeaSpark(entity.Botania.botania:corporeaSpark) |
功能
Corporea 是 Botania 的跨区块物流网络,功能上对应 EnderIO 的 Ender Chest。它用 Corporea Spark(法力火花)作为网络令牌,通过 Corporea Index 建立索引、Corporea Funnel / Interceptor / Crystal Cube 作为存取端,把物品在任意距离的终端之间传输。
BlockCorporeaRetainer 特殊:它不继承 BlockCorporeaBase,而是直接 extends BlockModContainer<TileCorporeaRetainer>,并额外实现 ILexiconable(BlockCorporeaRetainer.java:29)。
BlockCorporeaBase 的基类构造只做两件事(BlockCorporeaBase.java:35-36):保存 material 并 setBlockName(name)。硬度 5.5 由每个子类各自设置。
数值
| 方块类 | 注册名常量 | 材质 | 硬度 | TileEntity |
|---|---|---|---|---|
BlockCorporeaIndex |
CORPOREA_INDEX |
iron | 5.5 | TileCorporeaIndex |
BlockCorporeaFunnel |
CORPOREA_FUNNEL |
iron | 5.5 | TileCorporeaFunnel |
BlockCorporeaInterceptor |
CORPOREA_INTERCEPTOR |
iron | 5.5 | TileCorporeaInterceptor |
BlockCorporeaCrystalCube |
CORPOREA_CRYSTAL_CUBE |
iron | 5.5 | TileCorporeaCrystalCube |
BlockCorporeaRetainer |
CORPOREA_RETAINER |
iron | 5.5 | TileCorporeaRetainer |
显示名(en_US.lang 的 tile.botania:corporea*.name):Corporea Index、Corporea Funnel、Corporea Interceptor、Corporea Crystal Cube、Corporea Retainer,与 5 个方块一一对应。
配套物品(item.botania:corporeaSpark*):Corporea Spark 与 Master Corporea Spark。
存储包装层
common/integration/corporea/ 下有 4 个库存包装类,使 Corporea 能对接外部存储:
| 包装类 | 用途 |
|---|---|
WrappedIInventory |
通用 IInventory 包装 |
WrappedInventoryBase |
包装基类 |
WrappedDeepStorage |
对接 Storage Drawers |
WrappedStorageDrawers |
对接 Storage Drawers |
交互
| 触发 | 行为 |
|---|---|
| 放置 | 自动注册 ItemBlock(ItemBlockMod/ItemCubeMod,由 BlockMod.java:41 决定) |
| 制作 | 实现 ICraftAchievement,制作时触发成就 |
| 合成火花 | Corporea Spark 有普通与 Master 两个等级(lang 中 corporeaSpark0 / corporeaSpark1) |
| Storage Drawers 对接 | 通过 WrappedDeepStorage / WrappedStorageDrawers,需加载 Storage Drawers |