Skip to content

Commit

Permalink
Fix raiders & guards attacking while dying (ldtteam#7785) (ldtteam#7786)
Browse files Browse the repository at this point in the history
Stop the entity using AttackMoveAI from attacking if it is dead or dying. This affects raiders and guards.
  • Loading branch information
Vortrox authored Nov 20, 2021
1 parent 61f47ed commit 2b842ca
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ public void readAdditionalSaveData(final CompoundNBT compound)
@Override
public void aiStep()
{
if (!this.isAlive())
{
return;
}

updateSwingTime();

if (invulTime > 0)
Expand Down

0 comments on commit 2b842ca

Please sign in to comment.