mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix: prevent mobs from attacking when already dead (#1549)
This commit is contained in:
@@ -132,6 +132,11 @@ impl MobEntity {
|
||||
// TODO: Use entity attributes for damage once implemented
|
||||
const ZOMBIE_ATTACK_DAMAGE: f32 = 3.0;
|
||||
|
||||
if self.living_entity.dead.load(Relaxed) {
|
||||
// do not attack if dead
|
||||
return;
|
||||
}
|
||||
|
||||
target
|
||||
.damage_with_context(
|
||||
target,
|
||||
|
||||
Reference in New Issue
Block a user