fixed potential loss of resources in hotbar if armor will break, damaging an item will be registred in expected slots

This commit is contained in:
GameHerobrine 2025-05-30 09:43:46 +03:00
parent b272c1ec6a
commit 02a038a7f7
2 changed files with 9 additions and 4 deletions

View file

@ -1566,7 +1566,7 @@ class Entity extends Position
if($v2 < 1) $v2 = 1;
foreach($this->player->armor as $slot => $part){
$part->hurtAndBreak($v2, $this->player);
$part->hurtAndBreak($v2, $this->player, helditem: false);
}
$this->player->sendArmor();
}