Back in Minecraft 1.13, Mojang added a feature to Minecraft called "Data Packs". These are becoming increasingly popular over time, but should you use them over plugins for your Minecraft server?

What is a Data Pack

Data packs are add-ons you can install to a Minecraft server that inject "data" into the game. Minecraft is becoming increasingly data-driven, meaning that data controls more and more gameplay instead of code. Data packs allow modifying or extending this existing data to extend gameplay functionality in many ways.

At the time of writing, some of the things data packs can add are recipes, tags, advancements, loot tables, biomes, and even custom dimensions.

Generally, when people refer to using data packs instead of plugins, they refer to the functions feature of data packs.

Data Pack Functions

Functions in data packs are a way of running Minecraft commands procedurally. Doing this allows for data packs to add additional functionality to the game beyond what data modifications allow. Data packs can also run functions on load or every game tick.

As these just run Minecraft commands, they are still limited to what is possible with commands.

Data Packs vs Plugins

Data packs and plugins are surprisingly easy to decide between, as they each do specific tasks significantly better than the other.

When to use data packs

As the name suggests, data packs are very good at modifying or adding data to the game. While plugins can add some of these, such as recipes, the Spigot APIs are generally very broken. For other forms of data, the Spigot API entirely lacks ways to add them. Some plugins inject data packs to add some forms of data.

Custom dimensions can also be worth using data packs for, as the Spigot world generation API is very limited in what it can do. However, data packs can only make worlds that tweak existing parameters of the generation algorithm rather than create something entirely new.

An excellent way to check if a data pack only adds data is to go through the zip file and look for any folders named functions. If a folder with this name exists, it's doing more than just adding data and shouldn't be used over plugins.

When to use plugins

Plugins are very powerful compared to data packs, as they can make use of the Bukkit API directly through code. Compared to data pack functions, plugins can do significantly more and in a much more performance-friendly way. Due to Minecraft commands' limitations, data packs often have to do everything in a complicated way that can cause significantly more performance overhead. Commands, in general, are also just slower than code.

If you're trying to add any functionality that's not data-driven, plugins are almost always a significantly better option.

Conclusion

As with most things, data packs have their use cases. As Minecraft becomes more data-driven, it's likely data packs will be useful for even more. Overall, Mojang's push to make the game more data-driven is an overall great move for the Minecraft server community. It means server modifications are capable of significantly more than they could do in the past. So while the data packs that many people push are probably a bad idea to use, data packs are a significant overall step for the Minecraft server community and should be celebrated.

This article is part of a series on how to run a Minecraft server. Click here to check out more!

Want to help me write more posts like this? Check out my Patreon!