UNPKG

@throw-out-error/minecraft-datapack

Version:

A module for making minecraft datapacks with node to cut down on the repetition.

55 lines (54 loc) 1.91 kB
import { Namespace } from "./namespace"; export * from "@throw-out-error/minecraft-mcfunction"; export * from "./loot"; export * from "./namespace"; export * from "./predicate"; export * from "./recipes"; export * from "./tag"; export declare class Datapack { name: string; path: string; format: number; description: string; minecraft: Namespace; namespaces: object; /** * Creates a datapack * @param {string} name The name of the datapack * @param {string} path The root path of were the datapack will compile to eg. C:\Users\Ree will cause the datapack to compile to C:\Users\Ree\datapack_name * @param {object} options Additional information regarding variable names and the pack.mcmeta file * @param {number} [options.foramt=5] The datapack format version * @param {string} [options.description=name] The datapack's description */ constructor(name: string, path: string, options?: { format?: number; description?: string; }); get mcmeta(): { pack: { pack_format: number; description: string; }; }; /** * Output the files of the datapack */ compile(path: string): Promise<void>; /** * Add a namespace to the datapack, minecraft is added by default this.minecraft * @param {Namespace} namespace The namespace to be added * @returns {Namespace} a reference to the added namespace */ addNamespace(namespace: Namespace): Namespace; /** * Creates a namespace and appends it to the datapack * @param {string} name The name of the namespace * @returns {Namespace} a reference to the created namespace */ createNamespace(name: string): Namespace; /** * Removes the namespace from the datapack * @param {string} name The name of the namespace */ deleteNamespace(name: any): void; }