mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
hotbar fixes
This commit is contained in:
parent
053ac5abb9
commit
a4a5f1dfdf
6 changed files with 16 additions and 9 deletions
|
|
@ -14,7 +14,7 @@ class PlayerEquipmentPacket extends RakNetDataPacket{
|
|||
$this->eid = $this->getInt();
|
||||
$this->item = $this->getShort();
|
||||
$this->meta = $this->getShort();
|
||||
$this->slot = $this->getByte();
|
||||
$this->slot = $this->getSignedByte();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
|
|
|||
|
|
@ -123,7 +123,12 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
protected function getShort($unsigned = false){
|
||||
return Utils::readShort($this->get(2), $unsigned);
|
||||
}
|
||||
|
||||
|
||||
public function getSignedByte(){
|
||||
$b = ord($this->get(1));
|
||||
return $b >= 0x80 ? ($b-256) : $b;
|
||||
}
|
||||
|
||||
protected function getByte(){
|
||||
return ord($this->get(1));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue