mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Living: fixed turtle helmet being non-removable and spamming inventory updates
closes #5786
This commit is contained in:
parent
30db658d70
commit
0051b34797
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user