MCFPP Examples
Each numbered directory is a standalone project. Start with a 26.3-capable MCFPP development build and JDK 25.
sh
git clone https://github.com/MinecraftFunctionPlusPlus/MCFPP_Example.git
cd MCFPP_Example/01-language-basics
mcfpp build
mcfpp test --dsb-jar /path/to/datapack-sandbox-cli.jarReplace the JAR path with your DatapackSandbox CLI. Source tests run in DSB. To run the first pack in game, copy build/basics into the world’s datapacks directory, then run /reload and /function showcase.basics:main. Expect sum=15, factorial=120 and 2.5 in chat.
In IDEA, open the numbered directory containing mcfpp.toml. Start at 09 for breakpoints or 07 for animation preview. In VS Code, open the repository’s examples.code-workspace.
Example repository · Build the compatible DSB runtime
Language and data
- 01 · Ranges, recursion and floats
- 02 · Give a position a name
- 03 · Calculate rewards with collection callbacks
- 04 · From chat components to scoreboard commands
- 05 · Copy an NBT address
Entities and game resources
- 06 · Change one of two display entities
- 07 · Animate a bouncing display
- 08 · Call MCFPP from an advancement reward