Skip to content

Datapack

Felix Schreiber edited this page May 22, 2025 · 2 revisions

The generated output target directory (or the packaged zip file) can be copied into a world's datapack directory. After that either exit and re-enter the world or use the /reload command ingame to reload the datapacks. To run a function, use the /function command. You may encounter an issue where the number of commands executed is greater than the maximum specified (65536 by default), so you may want to set it to a greater value:

/gamerule maxCommandChainLength 2147483647

Also you have to set the maximum number of forks a command can take to a higher value, too:

/gamerule maxCommandForkCount 2147483647

That ensures that branching will work properly. BUT: You risk crashing the game if not handled with care, as those settings often lead to overflowing the java vm stack, e.g. if you run into an infinite loop or a very long recursive series of functions.

Clone this wiki locally