Fix possible NPE when calculating knockback.

Closes #1731
This commit is contained in:
Bernhard Bonigl committed 2015-08-19 17:56:17 +02:00
1 parent 12109a1cc1
commit ba18f02e94
1 file changed
+1
@@ -257,6 +257,7 @@ public class AbilityHelper
public static float calcKnockback(Entity user, Entity entity, ItemStack stack, ToolCore tool, NBTTagCompound toolTags, int baseDamage)
{
if(user == null) return 0;
float knockback = 0;
if (entity instanceof EntityLivingBase && user instanceof EntityLivingBase)