GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
StartGamePacket 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::START_GAME_PACKET
 
 $entityUniqueId
 
 $entityRuntimeId
 
 $playerGamemode
 
 $x
 
 $y
 
 $z
 
 $pitch
 
 $yaw
 
 $seed
 
 $dimension
 
 $generator = 1
 
 $worldGamemode
 
 $difficulty
 
 $spawnX
 
 $spawnY
 
 $spawnZ
 
 $hasAchievementsDisabled = 1
 
 $dayCycleStopTime = -1
 
 $eduMode = 0
 
 $rainLevel
 
 $lightningLevel
 
 $commandsEnabled
 
 $isTexturePacksRequired = 0
 
 $levelId = ""
 
 $worldName
 
 $premiumWorldTemplateId = ""
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ decode()

decode ( )
61  {
62 
63  }

◆ encode()

encode ( )
68  {
69  $this->reset();
70  $this->putEntityId($this->entityUniqueId); //EntityUniqueID
71  $this->putEntityId($this->entityRuntimeId); //EntityRuntimeID
72  $this->putVarInt($this->playerGamemode); //client gamemode, other field is world gamemode
73  $this->putVector3f($this->x, $this->y, $this->z);
74  $this->putLFloat($this->pitch);
75  $this->putLFloat($this->yaw);
76  $this->putVarInt($this->seed);
77  $this->putVarInt($this->dimension);
78  $this->putVarInt($this->generator);
79  $this->putVarInt($this->worldGamemode);
80  $this->putVarInt($this->difficulty);
81  $this->putBlockCoords($this->spawnX, $this->spawnY, $this->spawnZ);
82  $this->putBool($this->hasAchievementsDisabled);
83  $this->putVarInt($this->dayCycleStopTime);
84  $this->putBool($this->eduMode);
85  $this->putLFloat($this->rainLevel);
86  $this->putLFloat($this->lightningLevel);
87  $this->putBool($this->commandsEnabled);
88  $this->putBool($this->isTexturePacksRequired);
89  $this->putUnsignedVarInt(0); //TODO: gamerules
90  $this->putString($this->levelId);
91  $this->putString($this->worldName);
92  $this->putString($this->premiumWorldTemplateId);
93  }

Field Documentation

◆ $commandsEnabled

$commandsEnabled

◆ $dayCycleStopTime

$dayCycleStopTime = -1

◆ $difficulty

$difficulty

◆ $dimension

$dimension

◆ $eduMode

$eduMode = 0

◆ $entityRuntimeId

$entityRuntimeId

◆ $entityUniqueId

$entityUniqueId

◆ $generator

$generator = 1

◆ $hasAchievementsDisabled

$hasAchievementsDisabled = 1

◆ $isTexturePacksRequired

$isTexturePacksRequired = 0

◆ $levelId

$levelId = ""

◆ $lightningLevel

$lightningLevel

◆ $pitch

$pitch

◆ $playerGamemode

$playerGamemode

◆ $premiumWorldTemplateId

$premiumWorldTemplateId = ""

◆ $rainLevel

$rainLevel

◆ $seed

$seed

◆ $spawnX

$spawnX

◆ $spawnY

$spawnY

◆ $spawnZ

$spawnZ

◆ $worldGamemode

$worldGamemode

◆ $worldName

$worldName

◆ $x

$x

◆ $y

$y

◆ $yaw

$yaw

◆ $z

$z

◆ NETWORK_ID

const NETWORK_ID = ProtocolInfo::START_GAME_PACKET

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