Change spell chat messages to hotbar toast notifications

This commit is contained in:
Electroblob77
2019-01-06 15:31:48 +00:00
parent b8ba7d1ea4
commit 2db96cf18d
15 changed files with 43 additions and 38 deletions
@@ -41,8 +41,8 @@ public class Poison extends SpellRay {
// Has no effect on undead or spiders.
if(MagicDamage.isEntityImmune(DamageType.POISON, target)){
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.resist", target.getName(),
this.getNameForTranslationFormatted()));
if(!world.isRemote && caster instanceof EntityPlayer) ((EntityPlayer)caster).sendStatusMessage(
new TextComponentTranslation("spell.resist", target.getName(), this.getNameForTranslationFormatted()), true);
}else{
target.attackEntityFrom(MagicDamage.causeDirectMagicDamage(caster, DamageType.POISON),
1 * modifiers.get(SpellModifiers.POTENCY));