UNPKG

@throw-out-error/minecraft-mcfunction

Version:

A simple way to create your mcfunction files using Typescript syntax.

32 lines 785 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Item = void 0; const _1 = require("."); class Item extends _1.ArgumentObject { constructor(item, nbt) { super(); this.includeNBT = false; this.item = item; this.nbt = nbt; } async *compile() { yield this.item; if (this.nbt) { yield '['; for await (let c of this.nbt.compile()) { yield c; } yield ']'; } } toString() { let str = this.item; const nbt = this.nbt; if (nbt) { str += `[${nbt.toString()}]`; } return str; } } exports.Item = Item; //# sourceMappingURL=item.js.map