User:ManosSef/Sandbox/Fake Minecraft Info/Java Edition 1.20/Technical

In 1.20, damage types are data-driven, which means that data packs can edit existing ones or add more.

Namespaced format
Damage types have now been made namespaced. This means that their ID's are now written in. As a result, these changes happened:

File hierarchy
This is the default file hierarchy for damage types in data packs.
 * data
 * minecraft
 * damage_types
 * cactus.json
 * drown.json
 * fly_into_wall.json
 * explosion.json
 * short_fall.json
 * stalagmite.json
 * anvil.json
 * falling_block.json
 * falling_stalactite.json
 * in_fire.json
 * on_fire.json
 * lava.json
 * lightning_bolt.json
 * hot_floor.json
 * magic.json
 * starve.json
 * in_wall.json
 * cramming.json
 * sweet_berry_bush.json
 * out_of_world.json
 * wither.json
 * dragon_breath.json
 * dryout.json
 * freeze.json
 * generic.json
 * bad_respawn_point.json
 * long_fall.json
 * player.json
 * mob.json
 * indirect_mob.json
 * arrow.json
 * fireball.json
 * thrown.json
 * explosion.player.json
 * fireworks.json
 * indirect_magic.json
 * sting.json
 * wither_skull.json
 * thorns.json
 * trident.json

File format

 * The root tag.
 * : The type of damage type. Can be for environmental damage,  for player/mob damage, or  for a custom damage type.

The rest of the tags are determined by the type.
 * minecraft:environment
 * : Settings for player or mob checking.
 * : Whether player or mob checking is enabled.
 * : If the player check succeeds, whether renamed item checking is enabled. Ignored if "value" is false.
 * minecraft:player
 * : Whether item checking is enabled.
 * : What happens if the damage was not caused by a player or mob.
 * : The action to perform when no player or mob caused the damage. Can be if the damage must at all costs be caused by a player or mob,  to set the  variable to the projectile or  to simulate another damage type.
 * : The damage type to simulate. Must exist if "action" is set to, and ignored if not.