SiliconGhetto Engine API
    Preparing search index...

    Function createToolsAPI

    • Returns {
          register(key: string, opts: ToolRegOpts): void;
          setBlockTier(blockType: number, tier: number): void;
          setBlockHardness(blockType: number, hardness: number): void;
      }

      • register: function
        • Register a custom tool (pickaxe, axe, shovel, sword, hoe).

          Parameters

          • key: string

            Unique identifier for this tool (e.g. "iron_pickaxe")

          • opts: ToolRegOpts

            Tool configuration (type, tier, mining speed, durability, color)

          Returns void

          game.tools.register('iron_pickaxe', {
          type: 'pickaxe', tier: 2, speed: 4,
          durability: 250, color: [0.8, 0.8, 0.8],
          });
      • setBlockTier: function
        • Set the minimum tool tier required to break a block type.

          Parameters

          • blockType: number

            Block type ID

          • tier: number

            Minimum tool tier (0 = hand, 1 = wood, 2 = stone, 3 = iron, 4 = diamond)

          Returns void

      • setBlockHardness: function
        • Set how long a block takes to break (higher = slower).

          Parameters

          • blockType: number

            Block type ID

          • hardness: number

            Break time multiplier (e.g. 1.5 for stone, 50 for obsidian)

          Returns void