@throw-out-error/minecraft-datapack
Version:
A module for making minecraft datapacks with node to cut down on the repetition.
38 lines (37 loc) • 1.12 kB
TypeScript
/**
* @class
* @alias module:tag
*/
export declare class Tag {
path: string;
type: "block" | "item" | "function";
values: string[];
/**
* Creates a tag
* @param {string} path The path of the tag file relative to namspace/tags/type (excluding the file extension)
* @param {('block'|'item'|'function')} type The type of tag
* @param {string[]} [values=[]] the values in the tag
*/
constructor(path: string, type: "block" | "item" | "function", values?: string[]);
/**
* Outputs the tag file
* @param {string} path The path of the namespace where the file will compile to
*/
compile(path: string): void;
/**
* Adds a value to the tag
* @param {string} value the value to be added
*/
addValue(value: string): void;
/**
* Removes a value from the tag
* @param {string} value the value to be removed
*/
deleteValue(value: string): void;
/**
* Returns a copy of the tag
* @param {Tag} tag the tag to be copied
* @returns {Tag} the copy of the tag
*/
static copy(tag: Tag): Tag;
}