GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
CommandBlockUpdatePacket 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::COMMAND_BLOCK_UPDATE_PACKET
 
 $isBlock
 
 $x
 
 $y
 
 $z
 
 $commandBlockMode
 
 $isRedstoneMode
 
 $isConditional
 
 $minecartEid
 
 $command
 
 $lastOutput
 
 $name
 
 $shouldTrackOutput
 
- 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  $this->isBlock = $this->getBool();
52 
53  if($this->isBlock){
54  $this->getBlockPosition($this->x, $this->y, $this->z);
55  $this->commandBlockMode = $this->getUnsignedVarInt();
56  $this->isRedstoneMode = $this->getBool();
57  $this->isConditional = $this->getBool();
58  }else{
59  //Minecart with command block
60  $this->minecartEid = $this->getEntityRuntimeId();
61  }
62 
63  $this->command = $this->getString();
64  $this->lastOutput = $this->getString();
65  $this->name = $this->getString();
66 
67  $this->shouldTrackOutput = $this->getBool();
68  }

◆ encode()

encode ( )
73  {
74  $this->reset();
75  $this->putBool($this->isBlock);
76 
77  if($this->isBlock){
78  $this->putBlockPosition($this->x, $this->y, $this->z);
79  $this->putUnsignedVarInt($this->commandBlockMode);
80  $this->putBool($this->isRedstoneMode);
81  $this->putBool($this->isConditional);
82  }else{
83  $this->putEntityRuntimeId($this->minecartEid);
84  }
85 
86  $this->putString($this->command);
87  $this->putString($this->lastOutput);
88  $this->putString($this->name);
89 
90  $this->putBool($this->shouldTrackOutput);
91  }

Field Documentation

◆ $command

$command

◆ $commandBlockMode

$commandBlockMode

◆ $isBlock

$isBlock

◆ $isConditional

$isConditional

◆ $isRedstoneMode

$isRedstoneMode

◆ $lastOutput

$lastOutput

◆ $minecartEid

$minecartEid

◆ $name

$name

◆ $shouldTrackOutput

$shouldTrackOutput

◆ $x

$x

◆ $y

$y

◆ $z

$z

◆ NETWORK_ID


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