mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Cleaned up muddled varint/varlong mess, added separate methods for entity unique and runtime ids, moved some MCPE-protocol-specific methods out of BinaryStream
This commit is contained in:
@ -39,13 +39,13 @@ class InteractPacket extends DataPacket{
|
||||
|
||||
public function decode(){
|
||||
$this->action = $this->getByte();
|
||||
$this->target = $this->getEntityId();
|
||||
$this->target = $this->getEntityRuntimeId();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putByte($this->action);
|
||||
$this->putEntityId($this->target);
|
||||
$this->putEntityRuntimeId($this->target);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user