UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

28 lines (27 loc) 805 B
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.StackableItemTrait = void 0; const ContentTraits_1 = require("./ContentTraits"); /** * Stackable - can stack to 64. */ class StackableItemTrait extends ContentTraits_1.ItemContentTrait { get id() { return "stackable"; } getData(config) { const maxStackSize = config?.maxStackSize ?? 64; return { id: "stackable", displayName: "Stackable", description: "Can stack to 64", category: "special", components: { "minecraft:max_stack_size": maxStackSize, }, }; } } exports.StackableItemTrait = StackableItemTrait;