Protection Change

Makes the protection enchantment's damage reduction formula configurable

13 downloads 0 followers

Modifies the protection enchantment's damage reduction formula to be a configurable value.

Ideal for modpacks where enchants can go past the vanilla/default maximum, there's armor sets with higher amounts of armor and armor toughness than netherite, or any other case where using protection becomes cancerous for PvP and/or makes PvE trivial, while keeping protection is preferable.

If you have any questions, concerns, or feature requests, either email me at [email protected], DM me on Discord by my handle hahajax, or open an issue on the GitHub

Config Guide

Formula Type

  • The type of formula to use in protection's damage reduction calculation
  • Can be either LINEAR or SQUARE_ROOT

Max Protection Levels

  • The maximum amount of protection levels possible, across all armor, before it's clamped
  • Can be calculated by multiplying the maximum level of protection obtainable by 4
  • Vanilla is 20, as protection only goes up to 4
  • Must be at least 4, for 1 level for every armor piece. If you want to disable the protection enchantment, this mod probably shouldn't be used

Square Root Constant

  • Constant to use for the SQUARE_ROOT formula; this is multiplied by the level of protection a player has by the Root Exponent
  • Must be between 0 and 1

Root Exponent

  • Exponent to use for the SQUARE_ROOT formula
  • Set to 0.5 by default. Don't change unless you know how to math and want to change it from square root to another root
  • Must be between 0 and 1

Linear Rate

  • The rate at which each level of protection increases its damage reduction, represented as a percentage per level
  • A rate of 0.04 replicates vanilla's formula, as this is effectively how vanilla does it
  • Must be between 0 and 1

AI Disclosure

I only used it to gain my footing with modding, alongside critical thinking skills to determine what exactly was happening with the code, and how to actually use it. Once I learned how to do a thing and how it works by example from gen-ai, I no longer used it whatsoever for that thing and anything similar enough. If there was a good bit of documentation somewhere, I used that instead. The only thing that was guided by ai was the mixin used. The exact mixin and what I put were entirely made by me; I would have had many more headaches trying to figure out how to do a mixin for anything if I had instead tried to understand Neoforge's (kinda bad) documentation the internet for random stackoverflow threads.

No gallery available for this project.

Version Minecraft Loader Download

Protection Change 1.0.0

1.0.0

1.21.1
neoforge
Download

Protection Change 0.1.0

0.1.0

1.21.1
neoforge
Download