mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Basically Fixed Inventory
This commit is contained in:
parent
dcb8732335
commit
8aacc27795
3 changed files with 36 additions and 17 deletions
|
|
@ -23,7 +23,7 @@ class PlayerEquipmentPacket extends RakNetDataPacket{
|
|||
$this->eid = $this->getInt();
|
||||
$this->item = $this->getShort();
|
||||
$this->meta = $this->getShort();
|
||||
if($this->PROTOCOL === ProtocolInfo::CURRENT_PROTOCOL){$this->slot = $this->getSignedByte();}
|
||||
if($this->PROTOCOL >= ProtocolInfo12::CURRENT_PROTOCOL_12){$this->slot = $this->getSignedByte();}
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
|
@ -31,7 +31,7 @@ class PlayerEquipmentPacket extends RakNetDataPacket{
|
|||
$this->putInt($this->eid);
|
||||
$this->putShort(BlockAPI::convertHighItemIdsToOldItemIds($this->PROTOCOL, $this->item));
|
||||
$this->putShort($this->meta);
|
||||
if($this->PROTOCOL === ProtocolInfo::CURRENT_PROTOCOL){$this->putByte($this->slot);}
|
||||
if($this->PROTOCOL >= ProtocolInfo12::CURRENT_PROTOCOL_12){$this->putByte($this->slot);}
|
||||
}
|
||||
|
||||
public function eidsToGlobal(Player $p){
|
||||
|
|
|
|||
|
|
@ -41,10 +41,6 @@ class UseItemPacket extends RakNetDataPacket{
|
|||
$this->item = $this->getShort();
|
||||
$this->meta = $this->getByte();
|
||||
$this->eid = $this->getInt();
|
||||
if ($this->PROTOCOL > ProtocolInfo9::CURRENT_PROTOCOL_9) {
|
||||
$this->unknownInt1 = $this->getInt();
|
||||
return;
|
||||
}
|
||||
$this->fx = $this->getFloat();
|
||||
$this->fy = $this->getFloat();
|
||||
$this->fz = $this->getFloat();
|
||||
|
|
@ -56,15 +52,7 @@ class UseItemPacket extends RakNetDataPacket{
|
|||
}
|
||||
|
||||
public function encode(){
|
||||
/*$this->reset();
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->y);
|
||||
$this->putInt($this->z);
|
||||
$this->putInt($this->face);
|
||||
$this->putShort($this->item);
|
||||
$this->putByte($this->meta);
|
||||
$this->putInt($this->eid);
|
||||
$this->putInt($this->unknownInt1);*/
|
||||
|
||||
}
|
||||
public function eidsToGlobal(Player $p){
|
||||
if($this->localEids){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue