UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

35 lines (34 loc) 971 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.HoeItemTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Hoe - farming tool. */ class HoeItemTrait extends ContentTraits_1.ItemContentTrait { get id() { return "hoe"; } getData(config) { const durability = config?.durability ?? 250; return { id: "hoe", displayName: "Hoe", description: "Farming tool", category: "tool", components: { "minecraft:durability": { max_durability: durability, }, "minecraft:hand_equipped": true, "minecraft:enchantable": { value: 10, slot: "hoe", }, }, }; } } exports.HoeItemTrait = HoeItemTrait;