-
Notifications
You must be signed in to change notification settings - Fork 45
Tutorials: Configuring Changed with Data Packs
This tutorial will cover how to create a data pack to extend Changed's compatibility among other mods. This tutorial assumes you understand JSON formatting.
Almost every facet to Minecraft is handled through registration, a process used "to make known" of the many different blocks, entities, items, biomes, structures, etc. that vanilla and mods have to offer. This registration assigns a name to each object that can be seen in-game when using commands or with advanced tooltips. The IDs have the following structure to them mod_id:object_name. In the code, these are referred to as ResourceLocation, and denote a namespace and a path. The Minecraft zombie has a tag of minecraft:zombie.
Each registry type has its own collection of tags specified through data packs (either embedded within mods, or provided by the player). These tags are JSON files that group a collection of registered objects under a common name.
Data packs are a structured collection of (mostly) JSON files to configure the behavior of vanilla and modded Minecraft. In a new folder, create the following structure:
<your new folder>/
- pack.mcmeta
- data/
- changed/
- tags/
- entity_types/
This is the only mandatory file within a data pack, and it contains metadata about the pack itself. In this case, you can fill it with:
{
"pack": {
"description": "My Changed Compatibility Pack",
"pack_format": 9
}
}This tutorial will not describe in detail the purpose of all Changed's tags, as that information can be found on a dedicated page.
The most common tag that a modpack creator will likely need to create is the changed:humanoids tag to define entities that can be transfurred.
Inside your pack's changed/tags/entity_types/ folder, create a new file named: humanoids.json
{
"replace": false,
"values": [
"minecraft:skeleton",
"minecraft:zombie"
]
}This tag will now label Minecraft's zombies and skeletons as changed:humanoids, and latexes will then target them to transfur them.
Note: These entities are already tagged by Changed. Attempting to tag an entity that doesn't exist will cause your tag to load with no entries.
You can package your data pack into a .zip file if you plan on distributing it to others. If you zip your pack, you must make sure that there's no extra folders at the root of the .zip, and that pack.mcmeta is on the root level of the zip file: yourPack.zip/pack.mcmeta.
You can enable your data pack by putting either the pack folder or pack .zip in Minecraft's datapacks/ folder. This can be browsed to in-game by navigating to "Data Packs" screen. See this external wiki page for detail on enabling your pack.