Function downloadAsset

  • Downloads an asset and copies it to the correct location. This will also save it in the correct location such that Minecraft will find it correctly (there will be two copies).

    Returns

    A useless promise to trigger async functionality.

    Parameters

    • name: string

      The asset's path in the Minecraft game data.

    • hash: string

      The asset's hash for resolving the download.

    • root: string = "./"

      An optional root directory to download to. Defaults to ./ (the current directory).

    Returns Promise<boolean>

Generated using TypeDoc