Living: fixed turtle helmet being non-removable and spamming inventory updates

closes #5786
This commit is contained in:
Dylan K. Taylor 2023-07-18 12:58:07 +01:00
parent 30db658d70
commit 0051b34797
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -637,9 +637,12 @@ abstract class Living extends Entity{
}
foreach($this->armorInventory->getContents() as $index => $item){
$oldItem = clone $item;
if($item->onTickWorn($this)){
$hasUpdate = true;
$this->armorInventory->setItem($index, $item);
if(!$item->equalsExact($oldItem)){
$this->armorInventory->setItem($index, $item);
}
}
}
}