User Tools

Site Tools


tutorial:damagetypes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:damagetypes [2023/09/03 22:17] – Rename some mapped classes and field names to Intermediary hiisuuiitutorial:damagetypes [2023/09/24 18:53] (current) – Use new minecraft wiki mattidragon
Line 8: Line 8:
 ==== Creating a Damage Type ==== ==== Creating a Damage Type ====
  
-First, create a json file for your custom damage type following the format [[https://minecraft.fandom.com/wiki/Damage_type|here]]. It should be placed in your mod's ''data'' folder in a new subfolder called ''damage_type''. For example:+First, create a json file for your custom damage type following the format [[https://minecraft.wiki/w/Damage_type|here]]. It should be placed in your mod's ''data'' folder in a new subfolder called ''damage_type''. For example:
 <code json data/tutorial/damage_type/custom_damage_type.json [enable_line_numbers="true"]> <code json data/tutorial/damage_type/custom_damage_type.json [enable_line_numbers="true"]>
 { {
Line 17: Line 17:
 </code> </code>
  
-Our new custom damage type will now cause 0.1 [[https://minecraft.fandom.com/wiki/Hunger#Exhaustion_level_increase|hunger exhaustion]] each time a player takes damage of this type, and the if the damage is caused by a living, non-player source (like being hit by a Zombie), the amount of damage dealt will scale with the world's difficulty. You can see all possible keys and values on the [[https://minecraft.fandom.com/wiki/Damage_type|respective Minecraft wiki page]].+Our new custom damage type will now cause 0.1 [[https://minecraft.wiki/w/Hunger#Exhaustion_level_increase|hunger exhaustion]] each time a player takes damage of this type, and the if the damage is caused by a living, non-player source (like being hit by a Zombie), the amount of damage dealt will scale with the world's difficulty. You can see all possible keys and values on the [[https://minecraft.wiki/w/Damage_type|respective Minecraft wiki page]].
  
 ==== Getting our damage type in code ==== ==== Getting our damage type in code ====
Line 88: Line 88:
 | avoids_guardian_thorns | Does not trigger the Thorns effect when attacking Guardians | | | avoids_guardian_thorns | Does not trigger the Thorns effect when attacking Guardians | |
 | burns_armor_stands | Deals a flat 4.0 damage to armor stands | | | burns_armor_stands | Deals a flat 4.0 damage to armor stands | |
-| bypasses_armor | Ignores all armor protection value | |+| bypasses_armor | Ignores all armor base protection value. Does not ignore Protection enchantments. | |
 | bypasses_effects | Bypasses both Resistance effect and Protection enchantments, but not armor. | | | bypasses_effects | Bypasses both Resistance effect and Protection enchantments, but not armor. | |
-| bypasses_enchantments | Ignores all types of Protection enchantments | |+| bypasses_enchantments | Ignores all types of Protection enchantments, but not base armor protection. | |
 | bypasses_invulnerability | Damages players who are invulnerable, such as in Creative or Spectator mode | | | bypasses_invulnerability | Damages players who are invulnerable, such as in Creative or Spectator mode | |
 | bypasses_resistance | Bypasses Resistance effect |  | | bypasses_resistance | Bypasses Resistance effect |  |
tutorial/damagetypes.1693779450.txt.gz · Last modified: 2023/09/03 22:17 by hiisuuii