UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

42 lines (41 loc) 1.26 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.LeggingsItemTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Leggings - leg armor. */ class LeggingsItemTrait extends ContentTraits_1.ItemContentTrait { get id() { return "leggings"; } getData(config) { const protection = config?.protection ?? 5; const durability = config?.durability ?? 225; return { id: "leggings", displayName: "Leggings", description: "Leg armor", category: "armor", components: { "minecraft:armor": { protection: protection, }, "minecraft:durability": { max_durability: durability, }, "minecraft:wearable": { slot: "slot.armor.legs", dispensable: true, }, "minecraft:enchantable": { value: 10, slot: "armor_legs", }, }, }; } } exports.LeggingsItemTrait = LeggingsItemTrait;