Skip to content

Project configuration ​

Use mcfpp.toml in the project root. The CLI searches parent directories for this file. Use --project to select a project explicitly.

A complete configuration ​

toml
schema = 1
name = "hello"
namespace = "hello"
version = "1.21.8"
description = "My first MCFPP datapack"
sourcePath = "src/main/mcfpp"
dataPath = "src/main/resources/data"
targetPath = "build"

[toolchain]
version = "java21-v1"

[mni]
enabled = false
FieldPurpose
schemaConfiguration format version, currently 1
nameProject name and output datapack directory name
namespaceDefault namespace
versionMinecraft target version for this build
descriptionDatapack description
sourcePathDirectory that contains MCFPP source files
dataPathExtra resources copied into the datapack's data/ directory
targetPathBuild output directory inside the project
toolchain.versionToolchain identifier used by the CLI
mni.enabledEnables Java MNI sources and dependencies

Paths are relative to the project root. The compiler reads .mcfpp files recursively. Use a separate output directory, such as build or out. mcfpp clean deletes this directory.

Compiler options ​

Set compiler options in the top-level args array. Place this line before the first [table]:

toml
args = ["-level=INFO", "--dump-ir"]

Command options override matching options in the file:

sh
mcfpp build -level=WARN
mcfpp build --dump-ir=inspect
mcfpp --project ./hello build

--dump-ir=inspect writes IR to build/inspect/. See Build output and IR.

Dependencies and MNI ​

Declare MCFPP libraries and Java dependencies in mcfpp-packages.json. The CLI updates mcfpp.lock and the MNI project's mcfpp-mni.lock. Commit configuration, dependency declarations, and lockfiles.

The [mni] table supports Java repositories, plugins, and Gradle extensions. See Gradle and Java builds.

See Minecraft target versions for version conditions.