GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
MoveEntityPacket Class Reference

Public Member Functions

 decode ()
 
 encode ()
 
- Public Member Functions inherited from DataPacket
 pid ()
 
 encode ()
 
 decode ()
 
 reset ()
 
 clean ()
 
 __debugInfo ()
 
 getEntityMetadata (bool $types=true)
 
 putEntityMetadata (array $metadata)
 
 getName ()
 
- Public Member Functions inherited from BinaryStream
 __construct ($buffer="", $offset=0)
 
 reset ()
 
 setBuffer ($buffer=null, $offset=0)
 
 getOffset ()
 
 getBuffer ()
 
 get ($len)
 
 put ($str)
 
 getBool ()
 
 putBool ($v)
 
 getLong ()
 
 putLong ($v)
 
 getInt ()
 
 putInt ($v)
 
 getLLong ()
 
 putLLong ($v)
 
 getLInt ()
 
 putLInt ($v)
 
 getSignedShort ()
 
 putShort ($v)
 
 getShort ()
 
 putSignedShort ($v)
 
 getFloat (int $accuracy=-1)
 
 putFloat ($v)
 
 getLShort ($signed=true)
 
 putLShort ($v)
 
 getLFloat (int $accuracy=-1)
 
 putLFloat ($v)
 
 getTriad ()
 
 putTriad ($v)
 
 getLTriad ()
 
 putLTriad ($v)
 
 getByte ()
 
 putByte ($v)
 
 getUUID ()
 
 putUUID (UUID $uuid)
 
 getSlot ()
 
 putSlot (Item $item)
 
 getString ()
 
 putString ($v)
 
 getUnsignedVarInt ()
 
 putUnsignedVarInt ($v)
 
 getVarInt ()
 
 putVarInt ($v)
 
 getEntityId ()
 
 putEntityId ($v)
 
 getBlockCoords (&$x, &$y, &$z)
 
 putBlockCoords ($x, $y, $z)
 
 getVector3f (&$x, &$y, &$z)
 
 putVector3f ($x, $y, $z)
 
 feof ()
 

Data Fields

const NETWORK_ID = ProtocolInfo::MOVE_ENTITY_PACKET
 
 $eid
 
 $x
 
 $y
 
 $z
 
 $yaw
 
 $headYaw
 
 $pitch
 
 $byte1
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
43  {
44  $this->eid = $this->getEntityId();
45  $this->getVector3f($this->x, $this->y, $this->z);
46  $this->pitch = $this->getByte() * (360.0 / 256);
47  $this->yaw = $this->getByte() * (360.0 / 256);
48  $this->headYaw = $this->getByte() * (360.0 / 256);
49  $this->byte1 = $this->getByte();
50  }

◆ encode()

encode ( )
55  {
56  $this->reset();
57  $this->putEntityId($this->eid);
58  $this->putVector3f($this->x, $this->y, $this->z);
59  $this->putByte($this->pitch / (360.0 / 256));
60  $this->putByte($this->yaw / (360.0 / 256));
61  $this->putByte($this->headYaw / (360.0 / 256));
62  $this->putByte($this->byte1);
63  }

Field Documentation

◆ $byte1

$byte1

◆ $eid

$eid

◆ $headYaw

$headYaw

◆ $pitch

$pitch

◆ $x

$x

◆ $y

$y

◆ $yaw

$yaw

◆ $z

$z

◆ NETWORK_ID


The documentation for this class was generated from the following file: