UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

42 lines (41 loc) 1.28 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.ChestplateItemTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Chestplate - chest armor. */ class ChestplateItemTrait extends ContentTraits_1.ItemContentTrait { get id() { return "chestplate"; } getData(config) { const protection = config?.protection ?? 6; const durability = config?.durability ?? 240; return { id: "chestplate", displayName: "Chestplate", description: "Chest armor", category: "armor", components: { "minecraft:armor": { protection: protection, }, "minecraft:durability": { max_durability: durability, }, "minecraft:wearable": { slot: "slot.armor.chest", dispensable: true, }, "minecraft:enchantable": { value: 10, slot: "armor_torso", }, }, }; } } exports.ChestplateItemTrait = ChestplateItemTrait;