PocketMine-MP 5.15.1 git-fb9a74e8799c71ed8292cfa53abe7a4c9204629d
pocketmine\network\mcpe\protocol\serializer\PacketSerializer Class Reference
+ Inheritance diagram for pocketmine\network\mcpe\protocol\serializer\PacketSerializer:
+ Collaboration diagram for pocketmine\network\mcpe\protocol\serializer\PacketSerializer:

Public Member Functions

 feof ()
 
 get (int $len)
 
 getActorRuntimeId ()
 
 getActorUniqueId ()
 
 getAttributeList ()
 
 getBlockPosition ()
 
 getBool ()
 
 getBuffer ()
 
 getByte ()
 
 getCommandOriginData ()
 
 getDouble ()
 
 getEntityLink ()
 
 getEntityMetadata ()
 
 getFloat ()
 
 getGameRules ()
 
 getInt ()
 
 getItemStackWithoutStackId ()
 
 getItemStackWrapper ()
 
 getLDouble ()
 
 getLFloat ()
 
 getLInt ()
 
 getLLong ()
 
 getLong ()
 
 getLShort ()
 
 getLTriad ()
 
 getNbtCompoundRoot ()
 
 getNbtRoot ()
 
 getOffset ()
 
 getRecipeIngredient ()
 
 getRemaining ()
 
 getRotationByte ()
 
 getRoundedFloat (int $accuracy)
 
 getRoundedLFloat (int $accuracy)
 
 getShort ()
 
 getSignedBlockPosition ()
 
 getSignedLShort ()
 
 getSignedShort ()
 
 getSkin ()
 
 getString ()
 
 getStructureEditorData ()
 
 getStructureSettings ()
 
 getTriad ()
 
 getUnsignedVarInt ()
 
 getUnsignedVarLong ()
 
 getUUID ()
 
 getVarInt ()
 
 getVarLong ()
 
 getVector3 ()
 
 put (string $str)
 
 putActorRuntimeId (int $eid)
 
 putActorUniqueId (int $eid)
 
 putAttributeList (Attribute ... $attributes)
 
 putBlockPosition (BlockPosition $blockPosition)
 
 putBool (bool $v)
 
 putByte (int $v)
 
 putCommandOriginData (CommandOriginData $data)
 
 putDouble (float $v)
 
 putEntityLink (EntityLink $link)
 
 putEntityMetadata (array $metadata)
 
 putFloat (float $v)
 
 putGameRules (array $rules)
 
 putInt (int $v)
 
 putItemStackWithoutStackId (ItemStack $itemStack)
 
 putItemStackWrapper (ItemStackWrapper $itemStackWrapper)
 
 putLDouble (float $v)
 
 putLFloat (float $v)
 
 putLInt (int $v)
 
 putLLong (int $v)
 
 putLong (int $v)
 
 putLShort (int $v)
 
 putLTriad (int $v)
 
 putRecipeIngredient (RecipeIngredient $ingredient)
 
 putRotationByte (float $rotation)
 
 putShort (int $v)
 
 putSignedBlockPosition (BlockPosition $blockPosition)
 
 putSkin (SkinData $skin)
 
 putString (string $v)
 
 putStructureEditorData (StructureEditorData $structureEditorData)
 
 putStructureSettings (StructureSettings $structureSettings)
 
 putTriad (int $v)
 
 putUnsignedVarInt (int $v)
 
 putUnsignedVarLong (int $v)
 
 putUUID (UuidInterface $uuid)
 
 putVarInt (int $v)
 
 putVarLong (int $v)
 
 putVector3 (Vector3 $vector)
 
 putVector3Nullable (?Vector3 $vector)
 
 readCreativeItemNetId ()
 
 readItemStackNetIdVariant ()
 
 readItemStackRequestId ()
 
 readLegacyItemStackRequestId ()
 
 readOptional (\Closure $reader)
 
 readRecipeNetId ()
 
 readServerItemStackId ()
 
 rewind ()
 
 setOffset (int $offset)
 
 writeCreativeItemNetId (int $id)
 
 writeItemStackNetIdVariant (int $id)
 
 writeItemStackRequestId (int $id)
 
 writeLegacyItemStackRequestId (int $id)
 
 writeOptional (mixed $value, \Closure $writer)
 
 writeRecipeNetId (int $id)
 
 writeServerItemStackId (int $id)
 

Static Public Member Functions

static decoder (string $buffer, int $offset)
 
static encoder ()
 

Protected Member Functions

 __construct (string $buffer="", int $offset=0)
 

Protected Attributes

 $buffer
 
 $offset
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::__construct ( string  $buffer = "",
int  $offset = 0 
)
protected

Member Function Documentation

◆ decoder()

static pocketmine\network\mcpe\protocol\serializer\PacketSerializer::decoder ( string  $buffer,
int  $offset 
)
static

◆ encoder()

static pocketmine\network\mcpe\protocol\serializer\PacketSerializer::encoder ( )
static

◆ feof()

pocketmine\utils\BinaryStream::feof ( )
inherited

Returns whether the offset has reached the end of the buffer.

Definition at line 372 of file BinaryStream.php.

◆ get()

pocketmine\utils\BinaryStream::get ( int  $len)
inherited

@phpstan-impure

Exceptions
BinaryDataExceptionif there are not enough bytes left in the buffer

Definition at line 67 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\serializer\PacketBatch\decodeRaw(), pocketmine\world\format\io\leveldb\LevelDB\deserializeBlockPalette(), and raklib\protocol\OfflineMessage\readMagic().

+ Here is the caller graph for this function:

◆ getActorRuntimeId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getActorRuntimeId ( )
final
Exceptions
BinaryDataException

Definition at line 471 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\AnimateEntityPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getActorUniqueId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getActorUniqueId ( )
final

◆ getAttributeList()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getAttributeList ( )

Reads a list of Attributes from the stream.

Returns
Attribute[]
Exceptions
BinaryDataException

Definition at line 416 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getBlockPosition()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getBlockPosition ( )

Reads a block position with unsigned Y coordinate.

Exceptions
BinaryDataException

Definition at line 484 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\CommandBlockUpdatePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getBool()

pocketmine\utils\BinaryStream::getBool ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 105 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CommandBlockUpdatePacket\decodePayload(), and pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getBuffer()

pocketmine\utils\BinaryStream::getBuffer ( )
inherited

Definition at line 59 of file BinaryStream.php.

◆ getByte()

pocketmine\utils\BinaryStream::getByte ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 117 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\BookEditPacket\decodePayload(), pocketmine\network\mcpe\protocol\SetHudPacket\decodePayload(), pocketmine\network\mcpe\protocol\SetScorePacket\decodePayload(), raklib\protocol\AcknowledgePacket\decodePayload(), and pocketmine\network\mcpe\protocol\AvailableCommandsPacket\getEnumValueIndex().

+ Here is the caller graph for this function:

◆ getCommandOriginData()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getCommandOriginData ( )
Exceptions
BinaryDataException

Definition at line 641 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getDouble()

pocketmine\utils\BinaryStream::getDouble ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 257 of file BinaryStream.php.

◆ getEntityLink()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getEntityLink ( )
Exceptions
BinaryDataException

Definition at line 621 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getEntityMetadata()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getEntityMetadata ( )

Decodes entity metadata from the stream.

Returns
MetadataProperty[] @phpstan-return array<int, MetadataProperty>
Exceptions
PacketDecodeException
BinaryDataException

Definition at line 366 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getFloat()

pocketmine\utils\BinaryStream::getFloat ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 217 of file BinaryStream.php.

◆ getGameRules()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getGameRules ( )

Reads gamerules

Returns
GameRule[] game rule name => value @phpstan-return array<string, GameRule>
Exceptions
PacketDecodeException
BinaryDataException

Definition at line 589 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getInt()

pocketmine\utils\BinaryStream::getInt ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 193 of file BinaryStream.php.

◆ getItemStackWithoutStackId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getItemStackWithoutStackId ( )
Exceptions
PacketDecodeException
BinaryDataException

Definition at line 293 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getItemStackWrapper()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getItemStackWrapper ( )

◆ getLDouble()

pocketmine\utils\BinaryStream::getLDouble ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 269 of file BinaryStream.php.

◆ getLFloat()

pocketmine\utils\BinaryStream::getLFloat ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 237 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\AddActorPacket\decodePayload(), pocketmine\network\mcpe\protocol\AnimatePacket\decodePayload(), pocketmine\network\mcpe\protocol\BossEventPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), and pocketmine\network\mcpe\protocol\InteractPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLInt()

pocketmine\utils\BinaryStream::getLInt ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 205 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\MovePlayerPacket\decodePayload(), pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload(), and pocketmine\network\mcpe\protocol\SetScorePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLLong()

pocketmine\utils\BinaryStream::getLLong ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 293 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientCacheBlobStatusPacket\decodePayload(), and pocketmine\network\mcpe\protocol\ClientCacheMissResponsePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getLong()

pocketmine\utils\BinaryStream::getLong ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 281 of file BinaryStream.php.

◆ getLShort()

pocketmine\utils\BinaryStream::getLShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 149 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\BossEventPacket\decodePayload(), and pocketmine\network\mcpe\protocol\AvailableCommandsPacket\getCommandData().

+ Here is the caller graph for this function:

◆ getLTriad()

pocketmine\utils\BinaryStream::getLTriad ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 181 of file BinaryStream.php.

Referenced by raklib\protocol\AcknowledgePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getNbtCompoundRoot()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getNbtCompoundRoot ( )

◆ getNbtRoot()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getNbtRoot ( )

◆ getOffset()

pocketmine\utils\BinaryStream::getOffset ( )
inherited

Definition at line 55 of file BinaryStream.php.

◆ getRecipeIngredient()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getRecipeIngredient ( )

◆ getRemaining()

pocketmine\utils\BinaryStream::getRemaining ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 87 of file BinaryStream.php.

◆ getRotationByte()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getRotationByte ( )
Exceptions
BinaryDataException

Definition at line 563 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getRoundedFloat()

pocketmine\utils\BinaryStream::getRoundedFloat ( int  $accuracy)
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 225 of file BinaryStream.php.

◆ getRoundedLFloat()

pocketmine\utils\BinaryStream::getRoundedLFloat ( int  $accuracy)
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 245 of file BinaryStream.php.

◆ getShort()

pocketmine\utils\BinaryStream::getShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 129 of file BinaryStream.php.

◆ getSignedBlockPosition()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getSignedBlockPosition ( )

Reads a block position with a signed Y coordinate.

Exceptions
BinaryDataException

Definition at line 505 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ getSignedLShort()

pocketmine\utils\BinaryStream::getSignedLShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 157 of file BinaryStream.php.

◆ getSignedShort()

pocketmine\utils\BinaryStream::getSignedShort ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 137 of file BinaryStream.php.

◆ getSkin()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getSkin ( )

◆ getString()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getString ( )
Exceptions
BinaryDataException

Definition at line 84 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\AddActorPacket\decodePayload(), pocketmine\network\mcpe\protocol\AvailableCommandsPacket\decodePayload(), pocketmine\network\mcpe\protocol\BookEditPacket\decodePayload(), pocketmine\network\mcpe\protocol\BossEventPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), pocketmine\network\mcpe\protocol\ClientCacheMissResponsePacket\decodePayload(), pocketmine\network\mcpe\protocol\DeathInfoPacket\decodePayload(), pocketmine\network\mcpe\protocol\DimensionDataPacket\decodePayload(), pocketmine\network\mcpe\protocol\ItemComponentPacket\decodePayload(), pocketmine\network\mcpe\protocol\PlayerFogPacket\decodePayload(), pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload(), pocketmine\network\mcpe\protocol\PurchaseReceiptPacket\decodePayload(), pocketmine\network\mcpe\protocol\ResourcePackClientResponsePacket\decodePayload(), pocketmine\network\mcpe\protocol\SetScorePacket\decodePayload(), pocketmine\network\mcpe\protocol\TextPacket\decodePayload(), pocketmine\network\mcpe\protocol\UnlockedRecipesPacket\decodePayload(), pocketmine\network\mcpe\protocol\UpdateSoftEnumPacket\decodePayload(), pocketmine\network\mcpe\protocol\CommandOutputPacket\getCommandMessage(), and pocketmine\network\mcpe\protocol\AvailableCommandsPacket\getSoftEnum().

+ Here is the caller graph for this function:

◆ getStructureEditorData()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getStructureEditorData ( )

◆ getStructureSettings()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getStructureSettings ( )

◆ getTriad()

pocketmine\utils\BinaryStream::getTriad ( )
inherited

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 169 of file BinaryStream.php.

◆ getUnsignedVarInt()

pocketmine\utils\BinaryStream::getUnsignedVarInt ( )
inherited

◆ getUnsignedVarLong()

pocketmine\utils\BinaryStream::getUnsignedVarLong ( )
inherited

Reads a 64-bit variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 341 of file BinaryStream.php.

◆ getUUID()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getUUID ( )
Exceptions
BinaryDataException

Definition at line 96 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\EmoteListPacket\decodePayload(), and pocketmine\network\mcpe\protocol\PlayerListPacket\decodePayload().

+ Here is the caller graph for this function:

◆ getVarInt()

pocketmine\utils\BinaryStream::getVarInt ( )
inherited

Reads a 32-bit zigzag-encoded variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 324 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CraftingDataPacket\decodePayload(), and pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction\read().

+ Here is the caller graph for this function:

◆ getVarLong()

pocketmine\utils\BinaryStream::getVarLong ( )
inherited

Reads a 64-bit zigzag-encoded variable-length integer from the buffer and returns it.

@phpstan-impure

Exceptions
BinaryDataException

Definition at line 358 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\SetScoreboardIdentityPacket\decodePayload(), and pocketmine\network\mcpe\protocol\SetScorePacket\decodePayload().

+ Here is the caller graph for this function:

◆ getVector3()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::getVector3 ( )

Reads a floating-point Vector3 object with coordinates rounded to 4 decimal places.

Exceptions
BinaryDataException

Definition at line 526 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\decodePayload(), and pocketmine\network\mcpe\protocol\PlayerAuthInputPacket\decodePayload().

+ Here is the caller graph for this function:

◆ put()

pocketmine\utils\BinaryStream::put ( string  $str)
inherited

Definition at line 97 of file BinaryStream.php.

◆ putActorRuntimeId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putActorRuntimeId ( int  $eid)

◆ putActorUniqueId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putActorUniqueId ( int  $eid)

◆ putAttributeList()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putAttributeList ( Attribute ...  $attributes)

Writes a list of Attributes to the packet buffer using the standard format.

Definition at line 441 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ putBlockPosition()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putBlockPosition ( BlockPosition  $blockPosition)

Writes a block position with unsigned Y coordinate.

Definition at line 494 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\CommandBlockUpdatePacket\encodePayload().

+ Here is the caller graph for this function:

◆ putBool()

pocketmine\utils\BinaryStream::putBool ( bool  $v)
inherited

Definition at line 109 of file BinaryStream.php.

◆ putByte()

pocketmine\utils\BinaryStream::putByte ( int  $v)
inherited

Definition at line 121 of file BinaryStream.php.

◆ putCommandOriginData()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putCommandOriginData ( CommandOriginData  $data)

◆ putDouble()

pocketmine\utils\BinaryStream::putDouble ( float  $v)
inherited

Definition at line 261 of file BinaryStream.php.

◆ putEntityLink()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putEntityLink ( EntityLink  $link)

◆ putEntityMetadata()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putEntityMetadata ( array  $metadata)

Writes entity metadata to the packet buffer.

Parameters
MetadataProperty[]$metadata

@phpstan-param array<int, MetadataProperty> $metadata

Definition at line 401 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ putFloat()

pocketmine\utils\BinaryStream::putFloat ( float  $v)
inherited

Definition at line 229 of file BinaryStream.php.

◆ putGameRules()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putGameRules ( array  $rules)

Writes a gamerule array

Parameters
GameRule[]$rules@phpstan-param array<string, GameRule> $rules

Definition at line 608 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ putInt()

pocketmine\utils\BinaryStream::putInt ( int  $v)
inherited

Definition at line 197 of file BinaryStream.php.

◆ putItemStackWithoutStackId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putItemStackWithoutStackId ( ItemStack  $itemStack)

◆ putItemStackWrapper()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putItemStackWrapper ( ItemStackWrapper  $itemStackWrapper)

◆ putLDouble()

pocketmine\utils\BinaryStream::putLDouble ( float  $v)
inherited

Definition at line 273 of file BinaryStream.php.

◆ putLFloat()

pocketmine\utils\BinaryStream::putLFloat ( float  $v)
inherited

Definition at line 249 of file BinaryStream.php.

◆ putLInt()

pocketmine\utils\BinaryStream::putLInt ( int  $v)
inherited

Definition at line 209 of file BinaryStream.php.

◆ putLLong()

pocketmine\utils\BinaryStream::putLLong ( int  $v)
inherited

Definition at line 297 of file BinaryStream.php.

◆ putLong()

pocketmine\utils\BinaryStream::putLong ( int  $v)
inherited

Definition at line 285 of file BinaryStream.php.

◆ putLShort()

pocketmine\utils\BinaryStream::putLShort ( int  $v)
inherited

Definition at line 161 of file BinaryStream.php.

◆ putLTriad()

pocketmine\utils\BinaryStream::putLTriad ( int  $v)
inherited

Definition at line 185 of file BinaryStream.php.

◆ putRecipeIngredient()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putRecipeIngredient ( RecipeIngredient  $ingredient)

◆ putRotationByte()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putRotationByte ( float  $rotation)

◆ putShort()

pocketmine\utils\BinaryStream::putShort ( int  $v)
inherited

Definition at line 141 of file BinaryStream.php.

◆ putSignedBlockPosition()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putSignedBlockPosition ( BlockPosition  $blockPosition)

Writes a block position with a signed Y coordinate.

Definition at line 515 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ putSkin()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putSkin ( SkinData  $skin)

◆ putString()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putString ( string  $v)

◆ putStructureEditorData()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putStructureEditorData ( StructureEditorData  $structureEditorData)

◆ putStructureSettings()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putStructureSettings ( StructureSettings  $structureSettings)

◆ putTriad()

pocketmine\utils\BinaryStream::putTriad ( int  $v)
inherited

Definition at line 173 of file BinaryStream.php.

◆ putUnsignedVarInt()

◆ putUnsignedVarLong()

pocketmine\utils\BinaryStream::putUnsignedVarLong ( int  $v)
inherited

Writes a 64-bit variable-length integer to the end of the buffer.

Definition at line 348 of file BinaryStream.php.

◆ putUUID()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putUUID ( UuidInterface  $uuid)

◆ putVarInt()

pocketmine\utils\BinaryStream::putVarInt ( int  $v)
inherited

Writes a 32-bit zigzag-encoded variable-length integer to the end of the buffer.

Definition at line 331 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\CraftingDataPacket\encodePayload(), and pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction\write().

+ Here is the caller graph for this function:

◆ putVarLong()

pocketmine\utils\BinaryStream::putVarLong ( int  $v)
inherited

Writes a 64-bit zigzag-encoded variable-length integer to the end of the buffer.

Definition at line 365 of file BinaryStream.php.

Referenced by pocketmine\network\mcpe\protocol\SetScoreboardIdentityPacket\encodePayload(), and pocketmine\network\mcpe\protocol\SetScorePacket\encodePayload().

+ Here is the caller graph for this function:

◆ putVector3()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putVector3 ( Vector3  $vector)

Writes a floating-point Vector3 object

Definition at line 554 of file bedrock-protocol/src/serializer/PacketSerializer.php.

Referenced by pocketmine\network\mcpe\protocol\ClientboundDebugRendererPacket\encodePayload(), and pocketmine\network\mcpe\protocol\PlayerAuthInputPacket\encodePayload().

+ Here is the caller graph for this function:

◆ putVector3Nullable()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::putVector3Nullable ( ?Vector3  $vector)

Writes a floating-point Vector3 object, or 3x zero if null is given.

Note: ONLY use this where it is reasonable to allow not specifying the vector. For all other purposes, use the non-nullable version.

See also
PacketSerializer::putVector3()

Definition at line 541 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ readCreativeItemNetId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readCreativeItemNetId ( )

◆ readItemStackNetIdVariant()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readItemStackNetIdVariant ( )

This is a union of ItemStackRequestId, LegacyItemStackRequestId, and ServerItemStackId, used in serverbound packets to allow the client to refer to server known items, or items which may have been modified by a previous as-yet unacknowledged request from the client.

  • Server itemstack ID is positive
  • InventoryTransaction "legacy" request ID is negative and even
  • ItemStackRequest request ID is negative and odd
  • 0 refers to an empty itemstack (air)

Definition at line 782 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ readItemStackRequestId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readItemStackRequestId ( )

◆ readLegacyItemStackRequestId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readLegacyItemStackRequestId ( )

◆ readOptional()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readOptional ( \Closure  $reader)

@phpstan-template T @phpstan-param \Closure() : T $reader @phpstan-return T|null

Definition at line 824 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ readRecipeNetId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readRecipeNetId ( )

◆ readServerItemStackId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::readServerItemStackId ( )

◆ rewind()

pocketmine\utils\BinaryStream::rewind ( )
inherited

Rewinds the stream pointer to the start.

Definition at line 47 of file BinaryStream.php.

◆ setOffset()

pocketmine\utils\BinaryStream::setOffset ( int  $offset)
inherited

Definition at line 51 of file BinaryStream.php.

◆ writeCreativeItemNetId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeCreativeItemNetId ( int  $id)

◆ writeItemStackNetIdVariant()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeItemStackNetIdVariant ( int  $id)

This is a union of ItemStackRequestId, LegacyItemStackRequestId, and ServerItemStackId, used in serverbound packets to allow the client to refer to server known items, or items which may have been modified by a previous as-yet unacknowledged request from the client.

Definition at line 791 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ writeItemStackRequestId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeItemStackRequestId ( int  $id)

◆ writeLegacyItemStackRequestId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeLegacyItemStackRequestId ( int  $id)

◆ writeOptional()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeOptional ( mixed  $value,
\Closure  $writer 
)

@phpstan-template T @phpstan-param T|null $value @phpstan-param \Closure(T) : void $writer

Definition at line 836 of file bedrock-protocol/src/serializer/PacketSerializer.php.

◆ writeRecipeNetId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeRecipeNetId ( int  $id)

◆ writeServerItemStackId()

pocketmine\network\mcpe\protocol\serializer\PacketSerializer::writeServerItemStackId ( int  $id)

Member Data Documentation

◆ $buffer

pocketmine\utils\BinaryStream::$buffer
protectedinherited

Definition at line 37 of file BinaryStream.php.

◆ $offset

pocketmine\utils\BinaryStream::$offset
protectedinherited

Definition at line 35 of file BinaryStream.php.


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