GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
PlayerActionPacket 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::PLAYER_ACTION_PACKET
 
const ACTION_START_BREAK = 0
 
const ACTION_ABORT_BREAK = 1
 
const ACTION_STOP_BREAK = 2
 
const ACTION_RELEASE_ITEM = 5
 
const ACTION_STOP_SLEEPING = 6
 
const ACTION_SPAWN_SAME_DIMENSION = 7
 
const ACTION_JUMP = 8
 
const ACTION_START_SPRINT = 9
 
const ACTION_STOP_SPRINT = 10
 
const ACTION_START_SNEAK = 11
 
const ACTION_STOP_SNEAK = 12
 
const ACTION_SPAWN_OVERWORLD = 13
 
const ACTION_SPAWN_NETHER = 14
 
const ACTION_START_GLIDE = 15
 
const ACTION_STOP_GLIDE = 16
 
const ACTION_BUILD_DENIED = 17
 
const ACTION_CONTINUE_BREAK = 18
 
 $eid
 
 $action
 
 $x
 
 $y
 
 $z
 
 $face
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
63  {
64  $this->eid = $this->getEntityId();
65  $this->action = $this->getVarInt();
66  $this->getBlockCoords($this->x, $this->y, $this->z);
67  $this->face = $this->getVarInt();
68  }

◆ encode()

encode ( )
73  {
74  $this->reset();
75  $this->putEntityId($this->eid);
76  $this->putVarInt($this->action);
77  $this->putBlockCoords($this->x, $this->y, $this->z);
78  $this->putVarInt($this->face);
79  }

Field Documentation

◆ $action

$action

◆ $eid

$eid

◆ $face

$face

◆ $x

$x

◆ $y

$y

◆ $z

$z

◆ ACTION_ABORT_BREAK

const ACTION_ABORT_BREAK = 1

◆ ACTION_BUILD_DENIED

const ACTION_BUILD_DENIED = 17

◆ ACTION_CONTINUE_BREAK

const ACTION_CONTINUE_BREAK = 18

◆ ACTION_JUMP

const ACTION_JUMP = 8

◆ ACTION_RELEASE_ITEM

const ACTION_RELEASE_ITEM = 5

◆ ACTION_SPAWN_NETHER

const ACTION_SPAWN_NETHER = 14

◆ ACTION_SPAWN_OVERWORLD

const ACTION_SPAWN_OVERWORLD = 13

◆ ACTION_SPAWN_SAME_DIMENSION

const ACTION_SPAWN_SAME_DIMENSION = 7

◆ ACTION_START_BREAK

const ACTION_START_BREAK = 0

◆ ACTION_START_GLIDE

const ACTION_START_GLIDE = 15

◆ ACTION_START_SNEAK

const ACTION_START_SNEAK = 11

◆ ACTION_START_SPRINT

const ACTION_START_SPRINT = 9

◆ ACTION_STOP_BREAK

const ACTION_STOP_BREAK = 2

◆ ACTION_STOP_GLIDE

const ACTION_STOP_GLIDE = 16

◆ ACTION_STOP_SLEEPING

const ACTION_STOP_SLEEPING = 6

◆ ACTION_STOP_SNEAK

const ACTION_STOP_SNEAK = 12

◆ ACTION_STOP_SPRINT

const ACTION_STOP_SPRINT = 10

◆ NETWORK_ID


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