Protocol changes for 1.2.0.25

This commit is contained in:
Dylan K. Taylor
2017-09-02 11:05:49 +01:00
parent 5d75d3d5b6
commit 604d8ecf9a
5 changed files with 17 additions and 8 deletions

View File

@ -185,7 +185,7 @@ class PlayerInventory extends BaseInventory{
public function sendHotbar(){
$pk = new PlayerHotbarPacket();
$pk->windowId = ContainerIds::INVENTORY;
$pk->selectedSlot = $this->getHeldItemIndex();
$pk->selectedHotbarSlot = $this->getHeldItemIndex();
$pk->slots = array_map(function(int $link){ return $link + $this->getHotbarSize(); }, $this->getHotbar());
$this->getHolder()->dataPacket($pk);
}