mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
Binary strict types (#969)
* Some Binary cleanup, type-hints and strict types yes, I know this is very crashy... that's good, because it highlights unexpected behaviour * added some default values
This commit is contained in:
@ -50,19 +50,19 @@ class EntityEventPacket extends DataPacket{
|
||||
|
||||
public $eid;
|
||||
public $event;
|
||||
public $unknown;
|
||||
public $data = 0;
|
||||
|
||||
public function decode(){
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
$this->event = $this->getByte();
|
||||
$this->unknown = $this->getVarInt();
|
||||
$this->data = $this->getVarInt();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putEntityRuntimeId($this->eid);
|
||||
$this->putByte($this->event);
|
||||
$this->putVarInt($this->unknown);
|
||||
$this->putVarInt($this->data);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Reference in New Issue
Block a user