From 7eba5f9deefe49a04a5c00dff087f277810a83c5 Mon Sep 17 00:00:00 2001 From: Sergey Shatunov Date: Thu, 11 Feb 2016 12:45:35 +0700 Subject: [PATCH] Fix crash with indirect damage when indirect entity == null, for example thrower is not entity. Fix #361 --- .../net/minecraft/util/EntityDamageSourceIndirect.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/net/minecraft/util/EntityDamageSourceIndirect.java.patch b/patches/net/minecraft/util/EntityDamageSourceIndirect.java.patch index 8b55e8a..ee5907c 100644 --- a/patches/net/minecraft/util/EntityDamageSourceIndirect.java.patch +++ b/patches/net/minecraft/util/EntityDamageSourceIndirect.java.patch @@ -5,7 +5,7 @@ super(p_i1568_1_, p_i1568_2_); this.indirectEntity = p_i1568_3_; + // KCauldron start - pass projectlie source -+ if (damageSourceEntity != null && damageSourceEntity.getBukkitEntity() instanceof org.bukkit.entity.Projectile && indirectEntity.getBukkitEntity() instanceof org.bukkit.projectiles.ProjectileSource) ++ if (damageSourceEntity != null && damageSourceEntity.getBukkitEntity() instanceof org.bukkit.entity.Projectile && indirectEntity != null && indirectEntity.getBukkitEntity() instanceof org.bukkit.projectiles.ProjectileSource) + ((org.bukkit.entity.Projectile) damageSourceEntity.getBukkitEntity()).setShooter((org.bukkit.projectiles.ProjectileSource) indirectEntity.getBukkitEntity()); + // KCauldron end }