The effect Magic Resistance only protects against the damage sources of type "indirect_magic" and not "magic".
I believe this is due to this line of code:
"(source.isOf(DamageTypes.INDIRECT_MAGIC) || source.isOf(DamageTypes.INDIRECT_MAGIC)"
One of the conditions should probably be: "source.isOf(DamageTypes.MAGIC)"
The effect Magic Resistance only protects against the damage sources of type "indirect_magic" and not "magic". I believe this is due to this line of code: "(source.isOf(DamageTypes.INDIRECT_MAGIC) || source.isOf(DamageTypes.INDIRECT_MAGIC)" One of the conditions should probably be: "source.isOf(DamageTypes.MAGIC)"
By the way I love your mod.