Implement client-side spell counter for NPCs, fixes #345

Also makes all the continuous-spell-related methods in ISpellCaster default methods so they don't need implementing unless actually necessary.
This commit is contained in:
Electroblob77
2020-01-27 23:27:56 +00:00
parent aa166814ea
commit e4bf09f15a
9 changed files with 69 additions and 43 deletions
@@ -434,6 +434,7 @@ public class ClientProxy extends CommonProxy {
if(caster instanceof ISpellCaster){
if(spell.isContinuous || spell instanceof None){
((ISpellCaster)caster).setContinuousSpell(spell);
((ISpellCaster)caster).setSpellCounter(spell instanceof None ? 0 : 1);
((EntityLiving)caster).setAttackTarget((EntityLivingBase)target);
}
}