文档目录
物品打包机界面
物品分批器:9 幽灵过滤槽 + 9 缓冲槽 + 红石染色按钮行 + ALL/SINGLE 模式切换按钮,176×199
物品分批器物品栏
import { IeItemBatcherScreen } from "./index";
/**
* IeItemBatcherScreen 预览用例:过滤 3 项、缓冲 2 项、ALL 模式。
*/
export function IeItemBatcherScreenDemo() {
return (
<IeItemBatcherScreen
buffers={Array.from({ length: 9 }, (_, i) => i < 2 ? { count: 32, icon: "iron-ingot", tooltip: "缓冲物品" } : null)}
colors={[true, false, true, false, false, false, false, false, false]}
filters={Array.from({ length: 9 }, (_, i) => i < 3 ? { icon: "iron-ore", tooltip: "过滤物品" } : null)}
onColorClick={() => {}}
onModeToggle={() => {}}
onSlotClick={() => {}}
outputAll
/>
);
}
安装
$pnpm add @tennantite/ienpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ie/src/ie-item-batcher-screen/index.tsxnpm 包保留源码目录,可直接复制改造。