Return true in ADS methods when passed a null attacker, acting as a fallback for when caster does not save properly; fixes #40

This commit is contained in:
Electroblob
2018-06-04 23:45:10 +01:00
parent 54bb327fdf
commit dd07d08ff0
2 changed files with 13 additions and 5 deletions
@@ -203,11 +203,11 @@ public class MindControl extends Spell {
Entity caster = WizardryUtilities.getEntityByUUID(world, entityNBT.getUniqueId(MindControl.NBT_KEY));
// If the current target is already a valid mind control target, nothing happens.
if(WizardryUtilities.isValidTarget(caster, currentTarget)) return;
if(caster instanceof EntityLivingBase){
// If the current target is already a valid mind control target, nothing happens.
if(WizardryUtilities.isValidTarget(caster, currentTarget)) return;
if(MindControl.findMindControlTarget(entity, (EntityLivingBase)caster, world)){
// If it worked, skip setting the target to null.
return;