@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
30 lines (29 loc) • 841 B
JavaScript
;
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FuelItemTrait = void 0;
const ContentTraits_1 = require("./ContentTraits");
/**
* Fuel - can be used as fuel in a furnace.
*/
class FuelItemTrait extends ContentTraits_1.ItemContentTrait {
get id() {
return "fuel";
}
getData(config) {
const burnDuration = config?.burnDuration ?? 200;
return {
id: "fuel",
displayName: "Fuel",
description: "Can be used as fuel in a furnace",
category: "special",
components: {
"minecraft:fuel": {
duration: burnDuration,
},
},
};
}
}
exports.FuelItemTrait = FuelItemTrait;