-
Notifications
You must be signed in to change notification settings - Fork 0
Abloom API Datapack Guide
This guide explains how to create datapacks for the Abloom API mod. Datapacks allow you to configure elemental weapons, armor resistances, and mob elemental properties without modifying code.
your_datapack.zip
└── data
└── abloom
├── damage_type/ # Custom damage types (optional)
├── elemental_weapons/ # Elemental weapon configurations
├── armor_resistances/ # Armor resistance configurations
└── tags
└── entity_type
└── element_resistance/ # Mob elemental properties
Elemental weapons are defined in data/abloom/elemental_weapons/.
Each weapon configuration is a JSON file with the following structure:
{
"item": "modid:item_name",
"element": "ELEMENT_NAME",
"accumulation_multiplier": 1.0
}| Parameter | Type | Required | Description |
|---|---|---|---|
item |
string | Yes | Registry name of the item (e.g., minecraft:iron_sword) |
element |
string | Yes | One of the 13 element types (see below) |
accumulation_multiplier |
float | No | Multiplier for accumulation points (default: 1.0) |
Available elements:
-
FIRE- Fire damage -
PHYSICAL- Physical damage -
WIND- Wind damage -
EARTH- Earth damage -
WATER- Water damage -
ICE- Ice damage -
ELECTRIC- Electric damage -
ENERGY- Energy damage -
NATURAL- Natural damage -
QUANTUM- Quantum damage -
ETHER- Ether damage -
LIGHT- Light damage -
SHADOW- Shadow damage
{
"item": "minecraft:iron_sword",
"element": "FIRE",
"accumulation_multiplier": 3.0
}This makes iron swords deal fire damage and accumulate resonance 3x faster.
{
"item": "minecraft:diamond_axe",
"element": "WIND",
"accumulation_multiplier": 5.0
}This makes diamond axes deal wind damage and accumulate resonance 5x faster.
Armor resistances are defined in data/abloom/armor_resistances/.
{
"item": "modid:armor_name",
"resistances": {
"ELEMENT_NAME": 0.0,
"ANOTHER_ELEMENT": 0.1
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
item |
string | Yes | Registry name of the armor piece |
resistances |
object | Yes | Map of element → resistance value |
-
0.0- No resistance (default) -
0.5- 50% resistance (half damage) -
-0.5- 50% weakness (double damage) - Range:
-0.99to0.99
{
"item": "minecraft:leather_helmet",
"resistances": {
"ELECTRIC": 0.02,
"ICE": 0.01
}
}This gives leather helmets slight resistance to electric and ice damage.
{
"item": "minecraft:chainmail_chestplate",
"resistances": {
"WIND": 0.04
}
}This gives chainmail chestplates resistance to wind damage.
Mob elemental properties are defined using entity type tags in data/abloom/tags/entity_type/element_resistance/.
data/abloom/tags/entity_type/element_resistance/
├── fire/
│ ├── resistance.json # Mobs resistant to fire
│ └── weakness.json # Mobs weak to fire
├── water/
│ ├── resistance.json
│ └── weakness.json
└── [other elements]/
├── resistance.json
└── weakness.json
{
"replace": false,
"values": [
"minecraft:entity_type_1",
"minecraft:entity_type_2"
]
}| Parameter | Type | Required | Description |
|---|---|---|---|
replace |
boolean | No | Whether to replace existing values (default: false) |
values |
array | Yes | Array of entity type registry names |
{
"replace": false,
"values": [
"minecraft:blaze",
"minecraft:magma_cube",
"minecraft:wither",
"minecraft:ender_dragon",
"minecraft:strider",
"minecraft:zombified_piglin",
"minecraft:wither_skeleton",
"minecraft:ghast",
"minecraft:warden",
"minecraft:hoglin",
"minecraft:piglin",
"minecraft:piglin_brute",
"minecraft:zoglin",
"minecraft:husk",
"minecraft:camel"
]
}This makes all listed mobs resistant to fire damage (50% reduction).
{
"replace": false,
"values": [
"minecraft:snow_golem",
"minecraft:dolphin",
"minecraft:zombie",
"minecraft:zombie_villager",
"minecraft:drowned",
"minecraft:stray",
"minecraft:bogged"
]
}This makes all listed mobs weak to fire damage (50% increase).
- Place your datapack in
.minecraft/saves/[worldname]/datapacks/ - Reload with
/reloadcommand - Check logs for confirmation messages:
Loaded X elemental weapon configurations from datapacksLoaded X armor resistance configurations from datapacks
- Check that the
itemregistry name is correct - Verify the
elementvalue is one of the 13 supported types - Ensure the datapack is loaded (check
/reloadlogs)
- Verify the
itemregistry name matches the exact armor piece - Check that
resistancesvalues are within-0.99to0.99 - Ensure resistance values are positive for resistance, negative for weakness
- Verify entity type registry names are correct
- Check that tag files are in the correct subdirectory (
element_resistance/[element]/) - Ensure
valuesarray contains valid entity type IDs
You can create multiple datapack files for the same item with different elements:
// fire_sword.json
{
"item": "minecraft:iron_sword",
"element": "FIRE",
"accumulation_multiplier": 3.0
}
// physical_sword.json
{
"item": "minecraft:iron_sword",
"element": "PHYSICAL",
"accumulation_multiplier": 5.0
}To make items from your own mod elemental:
{
"item": "mymod:dragon_sword",
"element": "FIRE",
"accumulation_multiplier": 4.0
}To make mobs take more damage from specific elements:
{
"item": "minecraft:iron_chestplate",
"resistances": {
"FIRE": -0.2
}
}This makes the chestplate take 20% more fire damage (weakness).
- Abloom API README - Overview of Abloom API features
- Element Types - Complete list of element types with damage IDs
- Resonance Mechanics - How resonance accumulation works