Skip to content

Instantly share code, notes, and snippets.

View in2itivity's full-sized avatar

In2itivity in2itivity

View GitHub Profile
@tryashtar
tryashtar / max-enchant.md
Last active April 7, 2022 21:25
Max effective values for enchantments
Beta 1.9 Prerelease 5

⚠️ Any NBT tag type other than short for an item's enchantment level crashes Minecraft. Therefore, no enchantment can have a level above 32767 or below -32768.

Enchantment Formula Effective Range
  • Protection
  • Fire Protection
  • Feather Falling
  • Blast Protection
  • Projectile Protection
Start a running total. For each enchant, add (level² + 6) / 2 if the enchant protects against the taken damage. For feather falling, add twice. Cap the total at 25. Add one, then divide by two. Now add a random number between 0 and the total. Cap the new total at 20. If the total is one or greater, set the new incoming damage equal to (damage * (25 - total)) / 25.

Since the level gets squared, negative levels behave as their absolute value.
0 to 7
  • Lower levels are identical to their absolute value
  • Higher levels are identical to 7
Respiration Take the first respiration