Fix various problems caused by armour stands being a subclass of EntityLivingBase
This commit is contained in:
@@ -37,8 +37,7 @@ public class Poison extends Spell {
|
||||
RayTraceResult rayTrace = WizardryUtilities.standardEntityRayTrace(world, caster,
|
||||
10 * modifiers.get(WizardryItems.range_upgrade));
|
||||
|
||||
if(rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.ENTITY
|
||||
&& rayTrace.entityHit instanceof EntityLivingBase){
|
||||
if(rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.ENTITY && WizardryUtilities.isLiving(rayTrace.entityHit)){
|
||||
EntityLivingBase target = (EntityLivingBase)rayTrace.entityHit;
|
||||
// Has no effect on undead or spiders.
|
||||
if(MagicDamage.isEntityImmune(DamageType.POISON, target)){
|
||||
|
||||
Reference in New Issue
Block a user