Skip to content
MC Command Generator

Damage Type Generator

Beta

Name your damage type, pick how it scales and which sound it plays, tick what it ignores (armor, shields, Resistance) and write the death message. The preview shows the hit on each difficulty and the chat line when it kills someone.

Describe it — AI writes the command

Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.

Checking the AI…

Damage
Scales with difficulty
Behaviourvanilla tags
Death message
Message
Test it with /damage
−4 points (2 ♥)
Same damage on every difficulty♪ normal hurt sound+0.1 hunger exhaustion
Ignores armor
Steve was electrocutedSteve was electrocuted whilst fighting Zombielang key: death.attack.my_pack.electric_shock · death.attack.my_pack.electric_shock.player
A player with full health taking the hit, and the chat line if it kills them.

Your command · Java 26.3

35 characters
/damage @s 4 my_pack:electric_shock
data/my_pack/damage_type/electric_shock.json
{
  "exhaustion": 0.1,
  "message_id": "my_pack.electric_shock",
  "scaling": "never"
}
data/minecraft/tags/damage_type/bypasses_armor.json
{
  "values": [
    "my_pack:electric_shock"
  ]
}
  • The death message is a translation key, so it needs a resource pack: put {"death.attack.my_pack.electric_shock": "%1$s was electrocuted", "death.attack.my_pack.electric_shock.player": "%1$s was electrocuted whilst fighting %2$s"} in assets/my_pack/lang/en_us.json. Without it, chat shows the raw key death.attack.my_pack.electric_shock.
  • The tag files add your damage type to vanilla tags without replacing them (no "replace": true), so other packs keep working.
  • Custom damage types can only be dealt with /damage (or by other data-pack features that take a damage type).
  • Put the file in your data pack (or press Download data pack), drop the pack in your world's datapacks folder, then run /reload.

Raw editor

Read only — this generator writes files, edit them with the form.

How it works

A damage type is a small JSON file in data/<namespace>/damage_type/. It has been the same since damage types arrived in Java 1.19.4:

{
  "exhaustion": 0.1,
  "message_id": "my_pack.electric_shock",
  "scaling": "never"
}

scaling decides whether Hard hits harder (×1.5) and Easy softer: never, always, or only when a mob caused it. effects changes the hurt sound (thorns, drowning, burning, berry bush, freezing) and death_message_type can switch to the fall messages or the “Intentional Game Design” joke the bed explosion uses.

What it ignores: tags

“Ignores armor”, “can’t be blocked” and “counts as fire” are not in the file. The game reads them from vanilla tags, so the generator adds your type to them with extra files such as data/minecraft/tags/damage_type/bypasses_armor.json:

{"values": ["my_pack:electric_shock"]}

These add to the vanilla list instead of replacing it. The no_knockback tag only exists from Java 1.20.2, so it is left out on older versions.

Dealing the damage

Custom damage types are only used by the /damage command (Java 1.19.4+) and data-pack features that name a damage type:

damage @s 4 my_pack:electric_shock
damage @p 6 my_pack:electric_shock by @e[type=zombie,limit=1,sort=nearest]

Damage is in half hearts: 4 takes two hearts. Add “by” to credit an attacker, which the death message can name.

The death message

The message is a translation key built from message_id: death.attack.<message_id>, plus .player for when someone hurt the victim recently and .item for when the killer held a named item. A data pack can’t add text, so put the lines in a resource pack at assets/<namespace>/lang/en_us.json:

{"death.attack.my_pack.electric_shock": "%1$s was electrocuted",
 "death.attack.my_pack.electric_shock.player": "%1$s was electrocuted whilst fighting %2$s"}

Without the resource pack, chat shows the key itself. Bedrock has no custom damage types, so this generator is Java only.

FAQ

Why does my death message show “death.attack.something”?

The text of a death message comes from a language file, which only a resource pack can add. Put the key and your text in assets/<namespace>/lang/en_us.json and load the resource pack; the data pack alone only knows the key.

How do I make damage that ignores armor?

Tick “Ignores armor”. The generator adds your damage type to the vanilla #minecraft:bypasses_armor tag, which is what the game checks. Do the same with bypasses_shield, bypasses_enchantments or bypasses_resistance for shields, Protection and the Resistance effect.

How do I deal a custom damage type?

Use /damage <target> <amount> <type>, for example damage @s 4 my_pack:electric_shock. The amount is in half hearts. Mobs and blocks never use custom damage types on their own.

What does scaling do?

It decides whether difficulty changes the damage players take. With scaling on, Easy deals half the damage plus one (never more than the base) and Hard deals 1.5 times as much. “When a mob did it” only scales when the attacker is a mob, not a player.

Can I use this on Bedrock?

No. Bedrock has a fixed list of damage causes (used by /damage with names like fire or magic) and no way to add new ones.