Features:
- A library of ready made functions for datapack developers
- Compatible with every game version that can install datapacks
- A dfl:dfl_enable function lets other packs detect whether the library is loaded
- Start functions disable fall, fire, freeze and drowning damage
- The world spawn can be fixed to 0 0 0 with a spawn radius of zero
- Death counter scoreboard shown at the right of the screen and sorted from high to low
- Player health can be displayed below the player name
- Experience level or a health bar can be shown in the tab list
- One call creates a blue and a red team with prefixes and friendly fire turned off
- A tick function soft bans a player with constant teleports, adventure mode and negative effects
- Datapack format for Minecraft 1.13.2
- Made by white_elephant
Datapack Function Library is a toolbox for people who write their own datapacks. Instead of rebuilding the same command chains for every map, you call a function from the library and get the behaviour you need, and it runs on any version of Minecraft that can load datapacks at all. Because of the number of commands involved, older versions will not be able to use every function in the set.
The start group is meant to run when a pack is loaded or reloaded. One call switches off fall, fire, freeze and drowning damage. Another pins the world spawn to 0 0 0 and sets the spawn radius to zero, so players always reappear on the highest block at that spot. Display functions add a death counter on the right of the screen sorted from most deaths down, put a player’s health under their name, and show experience level or a health bar in the tab list, while a single team function creates a blue and a red team with name prefixes, friendly fire switched off and collision limited to other teams.
The tick group covers behaviour that has to be refreshed constantly, such as the soft ban function, which keeps a player teleported to 0 0 0 in adventure mode with negative effects and a title and subtitle you supply. Parameters are passed the way macro functions expect, and a few entries have a prerequisite function that must be run once beforehand. There is also a dfl:dfl_enable function that sets a scoreboard score for all entities, giving other packs and mods a simple way to confirm the library is present, and a matching resource pack supplies the localized text.