文档目录
空间 IO 端口界面
空间 IO 端口:spatialio.png 176×197,输入/输出元件槽 + 五行电力/效率/区域状态文字。
空间 IO 端口物品栏
import { Ae2SpatialIoPortScreen } from "./index";
/**
* Ae2SpatialIoPortScreen 预览用例:3×4×3 有效区域,效率 92%。
*/
export function Ae2SpatialIoPortScreenDemo() {
return (
<Ae2SpatialIoPortScreen
efficiency="92%"
hotbarItems={Array.from({ length: 9 }, (_, index) => ({ icon: index % 2 ? "charcoal" : "iron-ingot" }))}
input={{ icon: "emerald", tooltip: "空间存储元件" }}
mainItems={Array.from({ length: 12 }, (_, index) => ({ icon: index % 2 ? "gold-ingot" : "iron-ingot" }))}
maxPower="10 kAE"
output={{ icon: "diamond", tooltip: "已存储元件" }}
regionSize="3x4x3"
requiredPower="8.5 kAE"
storedPower="6 kAE"
/>
);
}
安装
$pnpm add @tennantite/ae2npm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ae2/src/ae2-spatial-io-port-screen/index.tsxnpm 包保留源码目录,可直接复制改造。