Skip to content

Commit

Permalink
Prevent crash when hitting ghast-fireballs etc. with tinker projectiles
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 20, 2014
1 parent 7372d0a commit 2396c9c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -206,7 +206,7 @@ public void onHitEntity(MovingObjectPosition movingobjectposition) {
// stonebound decreases, jagged increases damage too
float bonusDamage = -AbilityHelper.calcStoneboundBonus(ammo, tags);
// enchantments might add too
if(shootingEntity != null)
if(shootingEntity != null && movingobjectposition.entityHit instanceof EntityLivingBase)
bonusDamage += EnchantmentHelper.getEnchantmentModifierLiving((EntityLivingBase)this.shootingEntity, (EntityLivingBase)movingobjectposition.entityHit);
damage += bonusDamage;

Expand Down

0 comments on commit 2396c9c

Please sign in to comment.