Player: fixed held slot being out of sync after dying, closes #2788

it appears this premature optimization dates back to the days when PlayerHotbarPacket was not useless.
This commit is contained in:
Dylan K. Taylor 2019-02-27 09:26:56 +00:00
parent d1ced0ffc6
commit 20b4723728

View File

@ -3627,7 +3627,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
}
if($this->inventory !== null){
$this->inventory->setHeldItemIndex(0, false); //This is already handled when sending contents, don't send it twice
$this->inventory->setHeldItemIndex(0);
$this->inventory->clearAll();
}
if($this->armorInventory !== null){