Genisys  Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
DataPacket Class Reference

Inherits BinaryStream.

Inherited by AddEntityPacket, AddHangingEntityPacket, AddItemEntityPacket, AddItemPacket, AddPaintingPacket, AddPlayerPacket, AdventureSettingsPacket, AnimatePacket, AvailableCommandsPacket, BatchPacket, BlockEntityDataPacket, BlockEventPacket, ChangeDimensionPacket, ChunkRadiusUpdatedPacket, CommandStepPacket, ContainerClosePacket, ContainerOpenPacket, ContainerSetContentPacket, ContainerSetDataPacket, ContainerSetSlotPacket, CraftingDataPacket, CraftingEventPacket, DisconnectPacket, DropItemPacket, EntityEventPacket, ExplodePacket, FullChunkDataPacket, HurtArmorPacket, InteractPacket, InventoryActionPacket, ItemFrameDropItemPacket, LevelEventPacket, LevelSoundEventPacket, LoginPacket, MobArmorEquipmentPacket, MobEffectPacket, MobEquipmentPacket, MoveEntityPacket, MovePlayerPacket, PlayerActionPacket, PlayerFallPacket, PlayerInputPacket, PlayerListPacket, PlayStatusPacket, RemoveBlockPacket, RemoveEntityPacket, ReplaceItemInSlotPacket, RequestChunkRadiusPacket, ResourcePackClientResponsePacket, ResourcePacksInfoPacket, RespawnPacket, SetCommandsEnabledPacket, SetDifficultyPacket, SetEntityDataPacket, SetEntityLinkPacket, SetEntityMotionPacket, SetHealthPacket, SetPlayerGameTypePacket, SetSpawnPositionPacket, SetTimePacket, SpawnExperienceOrbPacket, StartGamePacket, StrangePacket, TakeItemEntityPacket, TextPacket, TransferPacket, UpdateAttributesPacket, UpdateBlockPacket, UpdateTradePacket, and UseItemPacket.

Collaboration diagram for DataPacket:
[legend]

Public Member Functions

 pid ()
 
 encode ()
 
 decode ()
 
 reset ()
 
 clean ()
 
 __debugInfo ()
 
 getEntityMetadata (bool $types=true)
 
 putEntityMetadata (array $metadata)
 
- 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 = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

getEntityMetadata ( bool  $types = true)

Decodes entity metadata from the stream.

Parameters
bool$typesWhether to include metadata types along with values in the returned array
Returns
array
putEntityMetadata ( array  $metadata)

Writes entity metadata to the packet buffer.

Parameters
array$metadata

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