GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
UpdateBlockPacket 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::UPDATE_BLOCK_PACKET
 
const FLAG_NONE = 0b0000
 
const FLAG_NEIGHBORS = 0b0001
 
const FLAG_NETWORK = 0b0010
 
const FLAG_NOGRAPHIC = 0b0100
 
const FLAG_PRIORITY = 0b1000
 
const FLAG_ALL = (self::FLAG_NEIGHBORS | self::FLAG_NETWORK)
 
const FLAG_ALL_PRIORITY = (self::FLAG_ALL | self::FLAG_PRIORITY)
 
 $x
 
 $z
 
 $y
 
 $blockId
 
 $blockData
 
 $flags
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
50  {
51 
52  }

◆ encode()

encode ( )
57  {
58  $this->reset();
59  $this->putBlockCoords($this->x, $this->y, $this->z);
60  $this->putUnsignedVarInt($this->blockId);
61  $this->putUnsignedVarInt(($this->flags << 4) | $this->blockData);
62  }

◆ getName()

getName ( )
Returns
PacketName|string
67  {
68  return "UpdateBlockPacket";
69  }

Field Documentation

◆ $blockData

$blockData

◆ $blockId

$blockId

◆ $flags

$flags

◆ $x

$x

◆ $y

$y

◆ $z

$z

◆ FLAG_ALL

const FLAG_ALL = (self::FLAG_NEIGHBORS | self::FLAG_NETWORK)

◆ FLAG_ALL_PRIORITY

const FLAG_ALL_PRIORITY = (self::FLAG_ALL | self::FLAG_PRIORITY)

◆ FLAG_NEIGHBORS

const FLAG_NEIGHBORS = 0b0001

◆ FLAG_NETWORK

const FLAG_NETWORK = 0b0010

◆ FLAG_NOGRAPHIC

const FLAG_NOGRAPHIC = 0b0100

◆ FLAG_NONE

const FLAG_NONE = 0b0000

◆ FLAG_PRIORITY

const FLAG_PRIORITY = 0b1000

◆ NETWORK_ID


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