Add DamageSafetyChecker, which implements an if-all-else-fails fix for cross-mod infinite looping in attack/hurt/damage events, and changes relevant calls to attack methods to use the safety checker methods instead. Also adds damage source blacklist and compatibility warnings config options. Fixes #72.

This commit is contained in:
Electroblob77
2019-01-06 17:51:41 +00:00
parent 3bdee06738
commit f564fdce60
6 changed files with 165 additions and 12 deletions
@@ -67,7 +67,7 @@ public class CurseOfSoulbinding extends SpellRay {
&& ((IElementalDamage)event.getSource()).isRetaliatory())){
WizardData data = WizardData.get((EntityPlayer)event.getEntityLiving());
if(data != null){
data.damageAllSoulboundCreatures(event.getAmount());
data.damageAllSoulboundCreatures(event.getAmount(), event.getSource().getDamageType());
}
}
}