Skip to content

Configuration

Ayfri edited this page Jun 8, 2024 · 5 revisions

DataPack Configuration

The configuration function allows configuring the output of the generated datapack.

Example

dataPack("mypack") {
	configuration {
		prettyPrint = true
		prettyPrintIndent = "  "
	}

	// ... rest of datapack code
}

This will configure the JSON output to be pretty printed with two spaces for indentation.

The available configuration options are:

  • prettyPrint - Whether to pretty print the JSON. Default is false.
  • prettyPrintIndent - The string to use for indenting when pretty printing. Only whitespace characters are allowed. Default is empty string.
  • generatedFunctionsFolder - The folder where the generated functions are stored. Defaults to "generated_scopes".
  • generateCommentOfGeneratedFunctionCall - Whether to generate a comment when an implicit generated function is called. Default is true.

Configuring a datapack is pretty useful for debugging.

Clone this wiki locally