Skip to content
Tennantite
中文
Documentation

CreateMillstoneScreen

Create millstone / crusher screen (1.21.1 atlases plus a composed window): CREATE_MACHINE_LAYOUT data table, input / vertical progress / output slots and player inventory.

Full-screen previewPreview pages are excluded from search indexes
Millstone

Composition

These are the composable components; the Block only places them at vanilla coordinates.

Code

import { CREATE_DEMO_FLOUR, CREATE_DEMO_PLAYER, CREATE_DEMO_WHEAT } from "../create-demo-data";
import { CreateMillstoneScreen } from "./index";

interface CreateMillstoneScreenDemoProps {
  progress?: number;
}

/**
 * 粉碎机(同一数据表 `crusher` 键):铁矿石 → 1 粉碎粗铁(另 75% 概率再产 1)。
 */
export function CreateCrusherScreenDemo() {
  return (
    <CreateMillstoneScreen
      input={{ count: 1, icon: "iron-ore", tooltip: "铁矿石" }}
      machine="crusher"
      output={{ count: 1, icon: "iron-ingot", tooltip: "粉碎粗铁" }}
      player={CREATE_DEMO_PLAYER}
      progress={0.5}
      title="Crusher"
    />
  );
}

/**
 * CreateMillstoneScreen 预览用例:小麦 → 小麦面粉,进度 0.5。
 */
export function CreateMillstoneScreenDemo({ progress = 0.5 }: CreateMillstoneScreenDemoProps = {}) {
  return (
    <CreateMillstoneScreen
      input={CREATE_DEMO_WHEAT}
      machine="millstone"
      output={CREATE_DEMO_FLOUR}
      player={CREATE_DEMO_PLAYER}
      progress={progress}
    />
  );
}