mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -40,7 +40,7 @@ class AnimatePacket extends DataPacket{
|
||||
public $entityRuntimeId;
|
||||
public $float = 0.0; //TODO (Boat rowing time?)
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->action = $this->getVarInt();
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
if($this->action & 0x80){
|
||||
@ -48,7 +48,7 @@ class AnimatePacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putVarInt($this->action);
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
if($this->action & 0x80){
|
||||
|
Reference in New Issue
Block a user