UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

42 lines (41 loc) 1.24 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.BootsItemTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Boots - foot armor. */ class BootsItemTrait extends ContentTraits_1.ItemContentTrait { get id() { return "boots"; } getData(config) { const protection = config?.protection ?? 2; const durability = config?.durability ?? 195; return { id: "boots", displayName: "Boots", description: "Foot armor", category: "armor", components: { "minecraft:armor": { protection: protection, }, "minecraft:durability": { max_durability: durability, }, "minecraft:wearable": { slot: "slot.armor.feet", dispensable: true, }, "minecraft:enchantable": { value: 10, slot: "armor_feet", }, }, }; } } exports.BootsItemTrait = BootsItemTrait;