Datapack

The main class for a datapack. Contains all namespaces and pack metadata.

Created using the datapack builder function

Example:

val dp = datapack {
name = "My Datapack"
description = "A datapack made with mcdsl"
packFormat = 12 // Defaults to 12
icon = "path/to/icon.png"
}

See also

Properties

Link copied to clipboard

The datapack description

Link copied to clipboard
var icon: String?

The datapack icon

Link copied to clipboard

The name of the datapack

Link copied to clipboard

The datapack pack format

Functions

Link copied to clipboard
fun namespace(namespace: String): Namespace

Create a new namespace in this datapack

Link copied to clipboard
fun print(path: Path)
fun print(path: String)

Outputs the datapack to the given path