GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
ResourcePackStackPacket 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::RESOURCE_PACK_STACK_PACKET
 
 $mustAccept = false
 
 $behaviorPackStack = []
 
 $resourcePackStack = []
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
42  {
43  /*$this->mustAccept = $this->getBool();
44  $behaviorPackCount = $this->getLShort();
45  while($behaviorPackCount-- > 0){
46  $packId = $this->getString();
47  $version = $this->getString();
48  $this->behaviorPackStack[] = new ResourcePackInfoEntry($packId, $version);
49  }
50 
51  $resourcePackCount = $this->getLShort();
52  while($resourcePackCount-- > 0){
53  $packId = $this->getString();
54  $version = $this->getString();
55  $this->resourcePackStack[] = new ResourcePackInfoEntry($packId, $version);
56  }*/
57  }

◆ encode()

encode ( )
62  {
63  $this->reset();
64  $this->putBool($this->mustAccept);
65 
66  $this->putUnsignedVarInt(count($this->behaviorPackStack));
67  foreach($this->behaviorPackStack as $entry){
68  $this->putString($entry->getPackId());
69  $this->putString($entry->getPackVersion());
70  }
71 
72  $this->putUnsignedVarInt(count($this->resourcePackStack));
73  foreach($this->resourcePackStack as $entry){
74  $this->putString($entry->getPackId());
75  $this->putString($entry->getPackVersion());
76  }
77  }

Field Documentation

◆ $behaviorPackStack

$behaviorPackStack = []

◆ $mustAccept

$mustAccept = false

◆ $resourcePackStack

$resourcePackStack = []

◆ NETWORK_ID


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