Move some code around to fix block placing, breaking, and throwing snowballs

This commit is contained in:
Dylan K. Taylor
2017-08-07 12:28:07 +01:00
parent 98e0a2ecba
commit 7958fffa07
7 changed files with 203 additions and 312 deletions

View File

@ -27,6 +27,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
use pocketmine\network\mcpe\protocol\types\ContainerIds;
use pocketmine\utils\Binary;
class PlayerHotbarPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::PLAYER_HOTBAR_PACKET;
@ -43,7 +44,7 @@ class PlayerHotbarPacket extends DataPacket{
$this->windowId = $this->getByte();
$count = $this->getUnsignedVarInt();
for($i = 0; $i < $count; ++$i){
$this->slots[$i] = $this->getUnsignedVarInt();
$this->slots[$i] = Binary::signInt($this->getUnsignedVarInt());
}
}