-
Notifications
You must be signed in to change notification settings - Fork 9
Datapack Changes in Version 2.3.x
IDs are no longer the primary way to indentify themes. Instead, "keys" are used.
A key is a modified version of the path of a file inside a datapack.
It consists of a namespace and a path: namespace:path.
However, we usually do not use the full path for the key, but a shortened version of it instead:
- File endings are left out
- Redundant directories at the beginning are left out.
A "redundant directory" is a directory that is included in every single path of a specific datapack content type.
For example, have a look at Minecraft's loot table structre:
data
|-- minecraft
|-- loot_tables <- contains all loot tables
Since all loot tables have to be in the loot_tables directory or a subdirectory of it, all loot table paths would begin with loot_tables/, and therefore that part is simply left out.
However, this does not mean that you can leave out any directory only because all of your files are somewhere inside of it. The part of the path you have to leave out should be specified and is always the same.
Let's say we have two loot tables common_loot.json and rare_loot.json:
data
|-- minecraft
|-- loot_tables
|-- common_loot.json
|-- special
|-- rare_loot.json
The key of common_loot.json would be minecraft:common_loot.
Notice that the loot_tables directory and the file ending have been left out.
The key of rare_loot.json would be minecraft:special/rare_loot since the loot_tables directory can be left out, but any subdirectories still have to be included.
- "Themes" are now mostly referred to as "primary themes"
- "Sub-Themes" are now referred to as "secondary themes"
- Removed
- Theme Mappings have been moved to new directories. The folder structure for mappings now looks like this:
data
|-- dungeoncrawl
|-- theming
|-- mappings
|-- primary (contains mappings that map biomes to primary themes, short "primary mappings")
|-- secondary (contains mappings that map biomes to secondary themes, short "secondary mappings")
- In addition, mappings no longer map biomes directly to themes / randomizers, but to a whole list of weighted themes instead:
Old:
{
"minecraft:jungle": 2
}where 2 would be the id of a theme or a randomizer
New:
{
"minecraft:jungle": [ { "key": "dungeoncrawl:vanilla/jungle/default", "weight": 1 } ]
}Biomes are now mapped to a list of entries like this:
[
{
"key": "a key",
"weight": 2
},
{
"key": "another key",
"weight": 1
},
{
"key": "and another key",
"weight": 1
}
]The key fields should hold the keys of primary or secondary themes, depending on which type of theme you are mapping to.
The weight fields hold the weights of those themes, just like the weights of items in a loot table. You can also leave the weight out. A weight value of 1 will be used in that case.