文档目录
红石炉界面
Thermal 红石炉界面(1.20.x 原版贴图):输入 / 燃料槽、进度箭头、火焰、竖向能量表、26×26 输出槽与右侧 3×3 强化面板。
红石炉玩家
强化
import {
THERMAL_DEMO_PLAYER_HOTBAR,
THERMAL_DEMO_PLAYER_MAIN,
} from "../thermal-demo-data";
import { ThermalRedstoneFurnaceScreen } from "./index";
interface ThermalRedstoneFurnaceScreenDemoProps {
energy?: { amount: number; capacity: number };
progress?: number;
speed?: number;
}
/**
* 空载状态(强化面板关闭、无输入输出)。
*/
export function ThermalRedstoneFurnaceIdleDemo() {
return (
<ThermalRedstoneFurnaceScreen
energy={{ amount: 80000, capacity: 400000 }}
input={{ count: 1, icon: "iron-ore", tooltip: "铁矿石" }}
onAugmentsToggle={() => {}}
playerHotbar={THERMAL_DEMO_PLAYER_HOTBAR}
playerItems={THERMAL_DEMO_PLAYER_MAIN}
/>
);
}
/**
* ThermalRedstoneFurnaceScreen 预览用例:打开强化面板,铁矿石 → 铁锭,进度 0.5。
*/
export function ThermalRedstoneFurnaceScreenDemo({
energy = { amount: 240000, capacity: 400000 },
progress = 0.5,
speed = 0.75,
}: ThermalRedstoneFurnaceScreenDemoProps = {}) {
return (
<ThermalRedstoneFurnaceScreen
augments={[
{ icon: "gunpowder", tooltip: "强化:处理速度" },
{ icon: "blaze-powder", tooltip: "强化:能量效率" },
null,
{ icon: "lapis-lazuli", tooltip: "强化:次要输出" },
]}
augmentsOpen
energy={energy}
input={{ count: 1, icon: "iron-ore", tooltip: "铁矿石" }}
onAugmentsToggle={() => {}}
onSlotClick={() => {}}
output={{ count: 1, icon: "iron-ingot", tooltip: "铁锭" }}
playerHotbar={THERMAL_DEMO_PLAYER_HOTBAR}
playerItems={THERMAL_DEMO_PLAYER_MAIN}
progress={progress}
speed={speed}
/>
);
}
安装
$pnpm add @tennantite/thermalnpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/thermal/src/redstone-furnace-screen/index.tsxnpm 包保留源码目录,可直接复制改造。