mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Updated AnimatePacket with extra float handling
This commit is contained in:
parent
6c5ca9b256
commit
5ce860c2f5
@ -31,17 +31,23 @@ class AnimatePacket extends DataPacket{
|
||||
|
||||
public $action;
|
||||
public $eid;
|
||||
public $float; //Boat rowing time?
|
||||
|
||||
public function decode(){
|
||||
$this->action = $this->getVarInt();
|
||||
$this->eid = $this->getEntityRuntimeId();
|
||||
//TODO: check extra float which appears when 0x80 bitflag is set
|
||||
if($this->action & 0x80){
|
||||
$this->float = $this->getLFloat();
|
||||
}
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putVarInt($this->action);
|
||||
$this->putEntityRuntimeId($this->eid);
|
||||
if($this->action & 0x80){
|
||||
$this->putLFloat($this->float);
|
||||
}
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user