-
-
Notifications
You must be signed in to change notification settings - Fork 0
Data Driven Fires
Data Driven Fires (DDFs) are Fire objects registered via a data pack rather than a mod. Note that Prometheus must be installed for DDFs to function.
DDFs offer a more user-friendly, faster, and easier way to register a Fire from another mod by using a data pack rather than requiring an extra mod.
This method is beneficial because data packs can be easily added to any world (new or existing) and are synchronized across all players by simply reloading the data pack or joining the world.
However, DDFs come with limitations: they can only register Fires from other mods and cannot include custom damage sources.
To add custom Fire enchantments, refer to the dedicated wiki page.
For a comprehensive guide on creating a data pack, refer to this guide.
Specifically for a DDFs data pack, it must be located in the datapacks/ folder of the world and must have the following structure:
datapacks >
your_data_pack_name >
pack.mcmeta
data >
prometheus >
fires >
JSON files...
For details about the pack.mcmeta file, check out this section of the data pack creation guide.
Ensure you replace your_data_pack_name with the actual name of your data pack, keeping all other names unchanged.
The JSON files are the core content of a DDFs data pack. Each JSON file can register Fires for only one mod.
The structure of a JSON file is as follows:
As mentioned, a DDFs data pack can only register Fires from another mod.
Note that Fires registered via mods take priority over DDFs.
A single DDF is represented by a JSON object, structured as follows:
{
// The only required field - must match the fire's name within the mod's code
"fire": "fire_id",
// Float, defaults to 1.0
"damage": 1.0,
// Boolean, defaults to false
"invertHealAndHarm": false,
// String, must be a valid ResourceLocation, defaults to "mod_id:fire_id_fire". Use "remove" to prevent association to any source block
"source": "remove",
// String, must be a valid ResourceLocation, defaults to "mod_id:fire_id_campfire". Use "remove" to prevent association to any campfire block
"campfire": "remove"
}For a detailed description of these fields, see the Fire Properties and Fire Components sections of this wiki.
Here are examples to register Cryptic Fire and Boric Fire from BYG:
{
"fire": "cryptic",
"damage": 3.5
// Source and campfire take their default values: "byg:cryptic_fire" and "byg:cryptic_campfire"
}{
"fire": "boric",
"damage": 3.5
// Source and campfire take their default values: "byg:boric_fire" and "byg:boric_campfire"
}The complete JSON file to register both BYG fires would look like this:
{
"mod": "byg",
"fires": [
{
"fire": "cryptic",
"damage": 3.5
},
{
"fire": "boric",
"damage": 3.5
}
]
}If you have any suggestions or questions about this wiki, please open an issue following the Documentation enhancement template.
{ "mod": "mod_id", "fires": [ // List of Fires of the "mod_id" mod to register ] }