Class Mod

Defines a data mod. Every element is added to an instance of this class.

Mod

Constructors

  • Initializes a new mod.

    Parameters

    • id: string

      The unique id for this mod.

    • writer: Writer

      The Writer instance used to write the mod files.

    • isRelease: boolean

      Controls whether the mod is in release mode. When in release mode, the output files are minified to reduce file size.

    Returns Mod

    Memberof

    Mod

Properties

blocks: Set<Block>

The Blocks declared within this mod.

Memberof

Mod

id: string

The unique id for this mod.

Memberof

Mod

isRelease: boolean

Controls whether the mod is in release mode. When in release mode, the output files are minified to reduce file size.

Memberof

Mod

writer: Writer

Methods

  • Returns the id for a given block declared within this mod.

    Parameters

    • block: string | Block

      Block entry or block id

    Returns string

  • Returns the id for a given BlockState declared within this mod.

    The ID for a block state is a string containing all unique values for every

    Parameters

    Returns string

  • Locks the current mod and writes all the data to the output directory.

    This function MUST be the last function called when creating a mod.

    Returns Promise<void>

    Memberof

    Mod

Generated using TypeDoc