@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
31 lines (30 loc) • 992 B
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CraftingStationBlockTrait = void 0;
const ContentTraits_1 = require("./ContentTraits");
/**
* Crafting station - allows crafting.
*/
class CraftingStationBlockTrait extends ContentTraits_1.BlockContentTrait {
get id() {
return "crafting_station";
}
getData(config) {
const craftingTags = config?.craftingTags ?? ["crafting_table"];
return {
id: "crafting_station",
displayName: "Crafting Station",
description: "Allows crafting",
category: "interactive",
components: {
"minecraft:crafting_table": {
crafting_tags: craftingTags,
table_name: "container.crafting",
},
},
};
}
}
exports.CraftingStationBlockTrait = CraftingStationBlockTrait;