NPCs should no longer be able to kill you with a projectile fired shortly before or during death

This commit is contained in:
ceikry
2022-04-15 22:07:34 -05:00
committed by Ryan
parent 6e804d4e99
commit bf60a0a658
@@ -168,7 +168,8 @@ public final class DeathTask extends NodeTask {
* @return {@code True} if so.
*/
public static boolean isDead(Entity e) {
return e.getAttribute("state:death", false);
if (e instanceof NPC) return ((NPC) e).getRespawnTick() > GameWorld.getTicks() || e.getAttribute("state:death", false);
else return e.getAttribute("state:death", false);
}
/**