<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ADamage_type</id>
	<title>Minecraft:Damage type - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ADamage_type"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Damage_type&amp;action=history"/>
	<updated>2026-04-21T20:51:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Damage_type&amp;diff=93047&amp;oldid=prev</id>
		<title>SyncBot: Sync: new page from Minecraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Damage_type&amp;diff=93047&amp;oldid=prev"/>
		<updated>2026-04-21T11:05:04Z</updated>

		<summary type="html">&lt;p&gt;Sync: new page from Minecraft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{about|data pack contents|the game mechanic|Damage}}{{exclusive|java}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Damage types&amp;#039;&amp;#039;&amp;#039; are [[Minecraft:JSON]] files located in [[Minecraft:Data pack|data packs]] that define different kinds of damage that entities can take. They control which attributes the damage has as well as which death message is used when an entity dies due to that type of damage.&lt;br /&gt;
&lt;br /&gt;
Additionally, the built-in [[Minecraft:Damage type tag (Java Edition)|damage type tags]] control many aspects of how damage is applied by the game.&lt;br /&gt;
&lt;br /&gt;
Custom damage types can be applied only by using the {{cmd|damage}} command.&lt;br /&gt;
&lt;br /&gt;
== JSON format ==&lt;br /&gt;
Damage types are stored as [[Minecraft:JSON]] files within a [[Minecraft:data pack]], at the path &amp;lt;code&amp;gt;data/&amp;lt;namespace&amp;gt;/damage_type/&amp;lt;name&amp;gt;.json&amp;lt;/code&amp;gt;.&amp;lt;div class=&amp;quot;treeview&amp;quot;&amp;gt;&lt;br /&gt;
* {{nbt|compound}} The root object.&lt;br /&gt;
** {{nbt|string|message_id}}: Used as part of the [[Minecraft:death message]] translation key if {{nbt|string|death_message_type}} is set to {{cd|default}}, as shown [[Minecraft:Damage type#Default message type|below]].&lt;br /&gt;
** {{nbt|float|exhaustion}}: The amount of hunger [[Minecraft:exhaustion]] caused by this damage type.&lt;br /&gt;
** {{nbt|string|scaling}}: Whether this damage type scales with [[Minecraft:difficulty]]. Possible values: {{cd|never}}, {{cd|always}}, or {{cd|when_caused_by_living_non_player}}. See [[Minecraft:Damage type#Scaling|below]] for more detail.&lt;br /&gt;
** {{nbt|string|effects}}: Optional field controlling how incoming damage is shown to the player. Possible values: {{cd|hurt}} (default), {{cd|thorns}}, {{cd|drowning}}, {{cd|burning}}, {{cd|poking}}, {{cd|freezing}}. See [[Minecraft:Damage type#Effects|below]] for more detail.&lt;br /&gt;
** {{nbt|string|death_message_type}}: Optional field that controls the kind of death messages to use. Possible values: {{cd|default}} (default), {{cd|fall_variants}}, {{cd|intentional_game_design}}. See [[Minecraft:Damage type#Death messages|below]] for more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;For example, here is JSON for the built-in {{cd|minecraft:arrow}}:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;exhaustion&amp;quot;: 0.1,&lt;br /&gt;
 	&amp;quot;message_id&amp;quot;: &amp;quot;arrow&amp;quot;,&lt;br /&gt;
	&amp;quot;scaling&amp;quot;: &amp;quot;when_caused_by_living_non_player&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of damage types ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Damage type&lt;br /&gt;
!Sources&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|arrow}}&lt;br /&gt;
|&lt;br /&gt;
* Any kind of [[Minecraft:arrow]] hitting something&lt;br /&gt;
* A spectral arrow or tipped arrow hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|bad_respawn_point}}&lt;br /&gt;
|&lt;br /&gt;
* A bed or respawn anchor exploding&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|cactus}}&lt;br /&gt;
|&lt;br /&gt;
* Touching a [[Minecraft:cactus]]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;campfire&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* Touching a [[Minecraft:campfire]] or [[Minecraft:soul campfire]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|cramming}}&lt;br /&gt;
|&lt;br /&gt;
* When too many mobs are in one place&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|dragon_breath}}&lt;br /&gt;
|&lt;br /&gt;
* Unused&amp;lt;ref&amp;gt;{{bug|MC-84595||&amp;quot;Roasted in dragon&amp;#039;s breath&amp;quot; death message does not appear when player is killed by dragon&amp;#039;s breath}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|drown}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while [[Minecraft:drowning]]&lt;br /&gt;
* [[Minecraft:Snow golem]]s, [[Minecraft:blaze]]s, [[Minecraft:endermen]], and [[Minecraft:strider]]s in water/rain&lt;br /&gt;
* [[Minecraft:Bee]]s underwater&lt;br /&gt;
* [[Minecraft:Fish]], [[Minecraft:tadpole]]s, [[Minecraft:dolphin]]s and [[Minecraft:squid]] are out of water for too long&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|dry_out}}&lt;br /&gt;
|&lt;br /&gt;
* When [[Minecraft:nautilus]]es, [[Minecraft:dolphin]]s, and [[Minecraft:axolotl]]s are out of water for too long&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|ender_pearl}}&lt;br /&gt;
|&lt;br /&gt;
* Teleporting with an [[Minecraft:ender pearl]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|explosion}}&lt;br /&gt;
|&lt;br /&gt;
* When an [[Minecraft:end crystal]] takes damage and blows up&lt;br /&gt;
* Damage to the [[Minecraft:ender dragon]] when the healing end crystal is destroyed&lt;br /&gt;
* A [[Minecraft:wither]] fight starting&lt;br /&gt;
* A [[Minecraft:minecart with TNT]] exploding, either from a flaming arrow or another reason&lt;br /&gt;
* [[Minecraft:TNT]] exploding when its fuse runs out&lt;br /&gt;
* A [[Minecraft:creeper]] exploding when its fuse runs out&lt;br /&gt;
* An explosion caused by a [[Minecraft:ghast fireball]] or [[Minecraft:Wither#Wither Skull|wither skull]]&lt;br /&gt;
* Explosions from the [[Minecraft:Ender Dragon#Re-summoning|dragon respawn animation]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|fall}}&lt;br /&gt;
|&lt;br /&gt;
* Any entity taking fall damage&lt;br /&gt;
* Riding an entity that took fall damage&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|falling_anvil}}&lt;br /&gt;
|&lt;br /&gt;
* A falling [[Minecraft:anvil]] hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|falling_block}}&lt;br /&gt;
|&lt;br /&gt;
* A non-anvil, non-dripstone [[Minecraft:falling block]] hitting an entity&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|falling_stalactite}}&lt;br /&gt;
|&lt;br /&gt;
* Falling [[Minecraft:pointed dripstone]] hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|fireball}}&lt;br /&gt;
|&lt;br /&gt;
* A ghast or blaze [[Minecraft:fireball]] with an owner hitting an entity directly&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|fireworks}}&lt;br /&gt;
|&lt;br /&gt;
* A firework exploding&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|fly_into_wall}}&lt;br /&gt;
|&lt;br /&gt;
* Hitting a wall or world border while flying using elytra, i.e. &amp;quot;kinetic energy&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|freeze}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while freezing in [[Minecraft:powder snow]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|generic}}&lt;br /&gt;
|&lt;br /&gt;
* [[Minecraft:Bee|Bees]] dying after stinging&lt;br /&gt;
* Simulating the [[Minecraft:Advancement/JSON format#minecraft:player hurt entity|{{cd|player_hurt_entity}}]] trigger when punching an [[Minecraft:interaction]] entity&lt;br /&gt;
* Used in a {{cd|DamageEvent}} package&lt;br /&gt;
* When reporting an end crystal killed by {{cmd|kill}} to the dragon fight&lt;br /&gt;
* An entity achieving a death that is not assigned to any damage type or is assigned to generic damage type&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|generic_kill}}&lt;br /&gt;
|&lt;br /&gt;
* Using {{cmd|kill}}&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|hot_floor}}&lt;br /&gt;
|&lt;br /&gt;
* Standing on a [[Minecraft:magma block]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|in_fire}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while standing in a [[Minecraft:fire]] or [[Minecraft:soul fire]] block&lt;br /&gt;
* Ticking damage while standing on a lit [[Minecraft:campfire]] or [[Minecraft:soul campfire]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|in_wall}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while stuck in a solid block&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|indirect_magic}}&lt;br /&gt;
|&lt;br /&gt;
* Instant damage from a [[Minecraft:harming]]/[[Minecraft:healing]] potion (drink, splash, or lingering)&lt;br /&gt;
* Extra damage from a [[Minecraft:guardian]]&amp;#039;s beam attack&lt;br /&gt;
* [[Minecraft:Evoker fangs]] with an owner dealing damage&lt;br /&gt;
* Damage dealt to [[Minecraft:snow golem]]s, [[Minecraft:blaze]]s, [[Minecraft:endermen]], and [[Minecraft:strider]]s from splash water bottles&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|lava}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while in [[Minecraft:lava]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|lightning_bolt}}&lt;br /&gt;
|&lt;br /&gt;
* When struck by [[Minecraft:lightning]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|mace_smash}}&lt;br /&gt;
|&lt;br /&gt;
* Extra damage by attacking using [[Minecraft:mace]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|magic}}&lt;br /&gt;
|&lt;br /&gt;
* Simulating a kill with {{cmd|loot kill}}&lt;br /&gt;
* Ticking damage from a [[Minecraft:Harming]]/[[Minecraft:Healing]] effect (i.e. not initial contact)&lt;br /&gt;
* Ticking damage from a [[Minecraft:Poison]] effect&lt;br /&gt;
* [[Minecraft:Evoker fangs]] with no owner dealing damage&lt;br /&gt;
* A [[Minecraft:Wither#Wither Skull|wither skull]] with no owner hitting something&lt;br /&gt;
* A [[Minecraft:conduit]] attack&lt;br /&gt;
* A arrow of harming hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|mob_attack}}&lt;br /&gt;
|&lt;br /&gt;
* Melee attack dealt by most mobs&lt;br /&gt;
* Touching a [[Minecraft:pufferfish]]&lt;br /&gt;
* The [[Minecraft:ender dragon]] pushing entities away&lt;br /&gt;
* A [[Minecraft:guardian]]&amp;#039;s beam attack&lt;br /&gt;
* A [[Minecraft:ravager]] roaring&lt;br /&gt;
* Touching a blaze&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|mob_attack_no_aggro}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:goat]] ramming&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|mob_projectile}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:shulker bullet]] hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|on_fire}}&lt;br /&gt;
|&lt;br /&gt;
* An entity burning&lt;br /&gt;
* [[Minecraft:Snow golem|Snow golems]] melting or burning&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|out_of_world}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage in the [[Minecraft:void]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|outside_border}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while outside the [[Minecraft:world border]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|player_attack}}&lt;br /&gt;
|&lt;br /&gt;
* A player hitting a mob&lt;br /&gt;
* A player dealing a sweeping attack&lt;br /&gt;
* Feeding a [[Minecraft:parrot]] a [[Minecraft:cookie]]&lt;br /&gt;
* A player breaking a non-mob entity&lt;br /&gt;
* When granting the {{cd|kill_mob_near_sculk_catalyst}} criteria if the actual damage type couldn&amp;#039;t be found&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|player_explosion}}&lt;br /&gt;
|&lt;br /&gt;
* Anything in {{cd|explosion}}, when it can be determined a player was directly responsible&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|sonic_boom}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:warden]] booming&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|spit}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:llama spit]]ting&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|stalagmite}}&lt;br /&gt;
|&lt;br /&gt;
* Falling too far onto [[Minecraft:pointed dripstone]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|starve}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:vex]] summoned by an [[Minecraft:evoker]] dying after it&amp;#039;s time ran out&lt;br /&gt;
* Ticking damage from having no food&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|sting}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:bee]] stinging&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|sweet_berry_bush}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage while moving in a [[Minecraft:berry bush]] block&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|thorns}}&lt;br /&gt;
|&lt;br /&gt;
* Attacking a [[Minecraft:guardian]] or [[Minecraft:elder guardian]]&lt;br /&gt;
* Attacking an entity wearing armor enchanted with [[Minecraft:thorns]]&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|thrown}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:snowball]], [[Minecraft:egg]], or [[Minecraft:ender pearl]] hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|trident}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:trident]] hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|unattributed_fireball}}&lt;br /&gt;
|&lt;br /&gt;
* A ghast or blaze [[Minecraft:fireball]] without an owner hitting an entity directly&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;wind_charge&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:wind charge]], thrown or fire from a [[Minecraft:breeze]], hitting something&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|wither}}&lt;br /&gt;
|&lt;br /&gt;
* Ticking damage from a [[Minecraft:Wither (effect)|Wither]] effect&lt;br /&gt;
|-&lt;br /&gt;
|{{cd|wither_skull}}&lt;br /&gt;
|&lt;br /&gt;
* A [[Minecraft:Wither#Wither Skull|wither skull]] with an owner hitting something&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scaling ==&lt;br /&gt;
Damage types control whether damage scales with [[Minecraft:difficulty]].{{info needed|how exactly does damage scale?}}&lt;br /&gt;
&lt;br /&gt;
Possible values of {{nbt|string|scaling}}:&lt;br /&gt;
&lt;br /&gt;
* {{cd|never}}: Damage is always the same.&lt;br /&gt;
* {{cd|always}}: Damage always scales with difficulty.&lt;br /&gt;
* {{cd|when_caused_by_living_non_player}}: Damage scales with difficulty if the attacker&amp;lt;ref name=&amp;quot;attacker2&amp;quot; group=&amp;quot;note&amp;quot;&amp;gt;The entity that was responsible for the damage. Also known as the &amp;quot;source entity&amp;quot;. For example, if a player is shot by a skeleton, the skeleton is the attacker. If a player is shot by a [[Minecraft:dispenser]], the arrow itself is the attacker. If the player is pricked by a cactus, there is no attacker.&amp;lt;/ref&amp;gt; was a living entity&amp;lt;ref name=&amp;quot;living2&amp;quot; group=&amp;quot;note&amp;quot;&amp;gt;This includes [[Minecraft:Armor stand|armor stands]].&amp;lt;/ref&amp;gt; and was not a player.&lt;br /&gt;
&lt;br /&gt;
== Effects ==&lt;br /&gt;
Damage types control how incoming damage is shown to the player.&lt;br /&gt;
&lt;br /&gt;
Possible values of {{nbt|string|effects}}:&lt;br /&gt;
&lt;br /&gt;
* {{cd|hurt}} (default): The default hurt sound.{{Sound||Player hurt1.ogg|Player hurt2.ogg|Player hurt3.ogg}}&lt;br /&gt;
* {{cd|thorns}}: [[Minecraft:Thorns]] hurt sound.{{Sound||Thorns1.ogg|Thorns2.ogg|Thorns3.ogg|Thorns4.ogg}}&lt;br /&gt;
* {{cd|drowning}}: [[Minecraft:Drowning]] sound.{{Sound||Player hurt drowning1.ogg|Player hurt drowning2.ogg|Player hurt drowning3.ogg|Player hurt drowning4.ogg}}&lt;br /&gt;
* {{cd|burning}}: A single tick of [[Minecraft:Burn|burning]] sound.{{Sound||Player hurt fire1.ogg|Player hurt fire2.ogg|Player hurt fire3.ogg}}&lt;br /&gt;
* {{cd|poking}}: [[Minecraft:Berry bush]] poke sound.{{Sound||Player hurt sweet berry bush1.ogg|Player hurt sweet berry bush2.ogg}}&lt;br /&gt;
* {{cd|freezing}}: [[Minecraft:Freezing]] tick sound.{{Sound||Player hurt freeze1.ogg|Player hurt freeze2.ogg|Player hurt freeze3.ogg|Player hurt freeze4.ogg|Player hurt freeze5.ogg}}&lt;br /&gt;
&lt;br /&gt;
== Death messages ==&lt;br /&gt;
Damage types control the [[Minecraft:death messages]] displayed when players or pets die.&lt;br /&gt;
&lt;br /&gt;
Possible values of {{nbt|string|death_message_type}}:&lt;br /&gt;
&lt;br /&gt;
* {{cd|default}} (default): Use the standard death message logic.&lt;br /&gt;
* {{cd|fall_variants}}: Use the fall damage death messages, e.g. &amp;lt;code&amp;gt;death.fell.assist.item&amp;lt;/code&amp;gt;.&lt;br /&gt;
* {{cd|intentional_game_design}}: Show the &amp;quot;intentional game design&amp;quot; death message.&lt;br /&gt;
&lt;br /&gt;
=== Default message type ===&lt;br /&gt;
When standard death message logic is being used, messages are generated as follows, making use of the {{nbt|string|message_id}} tag:&lt;br /&gt;
&lt;br /&gt;
* If the killing blow was caused by an attacker&amp;lt;ref name=&amp;quot;attacker2&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; and the attacker was holding a named [[Minecraft:item]] in their main hand at the time of death, this is categorized as an item death. A [[Minecraft:Raw JSON text format#Translated Text|translated message]] is displayed using the translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;.item&amp;lt;/code&amp;gt; with the following insertions available:&lt;br /&gt;
*# The name of the dying entity.&lt;br /&gt;
*# The name of the attacker.&lt;br /&gt;
*# The name of the item.&lt;br /&gt;
* If the killing blow was not caused by an attacker&amp;lt;ref name=&amp;quot;attacker2&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;, but the dying entity had recently{{info needed|how recently?}} taken damage that &amp;#039;&amp;#039;was&amp;#039;&amp;#039; caused by a living entity&amp;lt;ref name=&amp;quot;living2&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;, this is categorized as an assisted death. A [[Minecraft:Raw JSON text format#Translated Text|translated message]] is displayed using the translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;.player&amp;lt;/code&amp;gt; with the following insertions available:&lt;br /&gt;
*# The name of the dying entity.&lt;br /&gt;
*# The name of the recent attacker.&lt;br /&gt;
* If neither of the above apply, this is categorized as a normal death. A [[Minecraft:Raw JSON text format#Translated Text|translated message]] is displayed using the translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;&amp;lt;/code&amp;gt; with the following insertions available:&lt;br /&gt;
*# The name of the dying entity.&lt;br /&gt;
*# The name of the attacker&amp;lt;ref name=&amp;quot;attacker2&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt;, if there was one.&lt;br /&gt;
&lt;br /&gt;
=== Design ===&lt;br /&gt;
Because of how the default death messages are set up, most vanilla damage types are divided into ones that always have an attacker&amp;lt;ref name=&amp;quot;attacker2&amp;quot; group=&amp;quot;note&amp;quot; /&amp;gt; and ones that never have an attacker. Depending on whether there was an attacker, the translation for normal deaths (&amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;&amp;lt;/code&amp;gt;) has either one or two available insertions. Translations have no safe way to access an insertion that may or may not be there, so the primary options are:&lt;br /&gt;
&lt;br /&gt;
The death type is planned to always have an attacker.&lt;br /&gt;
&lt;br /&gt;
* The translation looks like&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;death.attack.mob&amp;quot;: &amp;quot;%s was slain by %s&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.mob.item&amp;quot;: &amp;quot;%s was slain by %s using %s&amp;quot;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* The translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;.player&amp;lt;/code&amp;gt; is not provided, since assisted deaths are impossible.&lt;br /&gt;
&lt;br /&gt;
The death type is planned to never have an attacker.&lt;br /&gt;
&lt;br /&gt;
* The translation looks like&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;death.attack.drown&amp;quot;: &amp;quot;%s drowned&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.drown.player&amp;quot;: &amp;quot;%s drowned whilst trying to escape %s&amp;quot;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* The translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;.item&amp;lt;/code&amp;gt; is not provided, since item deaths are impossible.&lt;br /&gt;
&lt;br /&gt;
The death type may or may not have an attacker.&lt;br /&gt;
&lt;br /&gt;
* The translation looks like&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;death.attack.electricity&amp;quot;: &amp;quot;%s was electrocuted&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.electricity.item&amp;quot;: &amp;quot;%s was electrocuted by %s using %s&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.electricity.player&amp;quot;: &amp;quot;%s was electrocuted whilst trying to escape %s&amp;quot;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* The translation key &amp;lt;code&amp;gt;death.attack.&amp;lt;message_id&amp;gt;&amp;lt;/code&amp;gt; avoids using the second insertion, since it may or may not be present.&lt;br /&gt;
* The translation is a little awkward, because the death message when killed by a player mention them only if they&amp;#039;re holding a named weapon.&lt;br /&gt;
&lt;br /&gt;
To avoid the awkwardness of the third option there can be two different damage types, one for use with an attacker, and one for use without an attacker:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;death.attack.active_electricity&amp;quot;: &amp;quot;%s was electrocuted by %s&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.active_electricity.item&amp;quot;: &amp;quot;%s was electrocuted by %s using %s&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.passive_electricity&amp;quot;: &amp;quot;%s was electrocuted&amp;quot;,&lt;br /&gt;
&amp;quot;death.attack.passive_electricity.player&amp;quot;: &amp;quot;%s was electrocuted whilst trying to escape %s&amp;quot;,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{HistoryTable&lt;br /&gt;
|{{HistoryLine|java}}&lt;br /&gt;
|{{HistoryLine||1.19.4|dev=23w06a|Added damage types to [[Minecraft:data pack]]s.}}&lt;br /&gt;
|{{HistoryLine||1.20|dev=pre1|Added {{cd|d=and|outside_border|generic_kill}}.}}&lt;br /&gt;
|{{HistoryLine||1.20.5|dev=23w51a|Added {{cd|spit}}.}}&lt;br /&gt;
|{{HistoryLine||1.21|dev=24w18a|Added {{cd|wind_charge}}.}}&lt;br /&gt;
|{{HistoryLine|||dev=24w19b|Added {{cd|campfire}}.}}&lt;br /&gt;
|{{HistoryLine||1.21.2|dev=24w33a|Added {{cd|mace_smash}} and {{cd|ender_pearl}}.}}&lt;br /&gt;
|{{HistoryLine||1.21.11|dev=25w41a|Added a new &amp;lt;code&amp;gt;minecraft:spear&amp;lt;/code&amp;gt; damage type.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [https://misode.github.io/damage-type/ Damage type Generator on misode.github.io]&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
{{notelist}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox Java Edition technical|datapack}}&lt;br /&gt;
[[Minecraft:de:Schadensarten]]&lt;br /&gt;
[[Minecraft:fr:Type de dégâts]]&lt;br /&gt;
[[Minecraft:ja:ダメージの種類]]&lt;br /&gt;
[[Minecraft:pt:Tipo de dano]]&lt;br /&gt;
[[Minecraft:zh:伤害类型]]&lt;/div&gt;</summary>
		<author><name>SyncBot</name></author>
	</entry>
</feed>