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

Public Member Functions

 decode ()
 
 encode ()
 
 getName ()
 
- 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::ADD_PLAYER_PACKET
 
 $uuid
 
 $username
 
 $eid
 
 $x
 
 $y
 
 $z
 
 $speedX
 
 $speedY
 
 $speedZ
 
 $pitch
 
 $headYaw
 
 $yaw
 
 $item
 
 $metadata = []
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
46  {
47 
48  }

◆ encode()

encode ( )
53  {
54  $this->reset();
55  $this->putUUID($this->uuid);
56  $this->putString($this->username);
57  $this->putEntityId($this->eid); //EntityUniqueID
58  $this->putEntityId($this->eid); //EntityRuntimeID
59  $this->putVector3f($this->x, $this->y, $this->z);
60  $this->putVector3f($this->speedX, $this->speedY, $this->speedZ);
61  $this->putLFloat($this->pitch);
62  $this->putLFloat($this->headYaw ?? $this->yaw);
63  $this->putLFloat($this->yaw);
64  $this->putSlot($this->item);
65  $this->putEntityMetadata($this->metadata);
66  }

◆ getName()

getName ( )
Returns
PacketName|string
71  {
72  return "AddPlayerPacket";
73  }

Field Documentation

◆ $eid

$eid

◆ $headYaw

$headYaw

◆ $item

$item

◆ $metadata

$metadata = []

◆ $pitch

$pitch

◆ $speedX

$speedX

◆ $speedY

$speedY

◆ $speedZ

$speedZ

◆ $username

$username

◆ $uuid

$uuid

◆ $x

$x

◆ $y

$y

◆ $yaw

$yaw

◆ $z

$z

◆ NETWORK_ID

const NETWORK_ID = ProtocolInfo::ADD_PLAYER_PACKET

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