|
| decode () |
|
| encode () |
|
| pid () |
|
| encode () |
|
| decode () |
|
| reset () |
|
| clean () |
|
| __debugInfo () |
|
| getEntityMetadata (bool $types=true) |
|
| putEntityMetadata (array $metadata) |
|
| getName () |
|
| __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 () |
|
◆ decode()
50 if(($this->type & self::BITFLAG_ENTITY_UPDATE) !== 0){
52 for($i = 0; $i < $count; ++$i){
56 if(($this->type & (self::BITFLAG_DECORATION_UPDATE | self::BITFLAG_TEXTURE_UPDATE)) !== 0){
57 $this->scale = $this->
getByte();
59 if(($this->type & self::BITFLAG_DECORATION_UPDATE) !== 0){
61 for($i = 0; $i < $count; ++$i){
63 $this->decorations[$i][
"rot"] = $weird & 0x0f;
64 $this->decorations[$i][
"img"] = $weird >> 4;
65 $this->decorations[$i][
"xOffset"] = $this->
getByte();
66 $this->decorations[$i][
"yOffset"] = $this->
getByte();
67 $this->decorations[$i][
"label"] = $this->
getString();
68 $this->decorations[$i][
"color"] = Color::fromARGB($this->
getLInt());
71 if(($this->type & self::BITFLAG_TEXTURE_UPDATE) !== 0){
◆ encode()
91 if(($eidsCount = count($this->eids)) > 0){
92 $type |= self::BITFLAG_ENTITY_UPDATE;
94 if(($decorationCount = count($this->decorations)) > 0){
95 $type |= self::BITFLAG_DECORATION_UPDATE;
97 if(count($this->colors) > 0){
98 $type |= self::BITFLAG_TEXTURE_UPDATE;
101 if((
$type & self::BITFLAG_ENTITY_UPDATE) !== 0){
103 foreach($this->eids as $eid){
107 if((
$type & (self::BITFLAG_TEXTURE_UPDATE | self::BITFLAG_DECORATION_UPDATE)) !== 0){
110 if((
$type & self::BITFLAG_DECORATION_UPDATE) !== 0){
112 foreach($this->decorations as $decoration){
113 $this->
putVarInt(($decoration[
"rot"] & 0x0f) | ($decoration[
"img"] << 4));
114 $this->
putByte($decoration[
"xOffset"]);
115 $this->
putByte($decoration[
"yOffset"]);
117 $this->
putLInt($decoration[
"color"]->toARGB());
120 if((
$type & self::BITFLAG_TEXTURE_UPDATE) !== 0){
◆ $colors
◆ $decorations
◆ $eids
◆ $height
◆ $mapId
◆ $scale
◆ $type
◆ $width
◆ $xOffset
◆ $yOffset
◆ BITFLAG_DECORATION_UPDATE
const BITFLAG_DECORATION_UPDATE = 0x04 |
◆ BITFLAG_ENTITY_UPDATE
const BITFLAG_ENTITY_UPDATE = 0x08 |
◆ BITFLAG_TEXTURE_UPDATE
const BITFLAG_TEXTURE_UPDATE = 0x02 |
◆ NETWORK_ID
The documentation for this class was generated from the following file:
- src/pocketmine/network/mcpe/protocol/ClientboundMapItemDataPacket.php