當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Binary::writeLong方法代碼示例

本文整理匯總了PHP中pocketmine\utils\Binary::writeLong方法的典型用法代碼示例。如果您正苦於以下問題:PHP Binary::writeLong方法的具體用法?PHP Binary::writeLong怎麽用?PHP Binary::writeLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pocketmine\utils\Binary的用法示例。


在下文中一共展示了Binary::writeLong方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->from);
     $this->buffer .= Binary::writeLong($this->to);
     $this->buffer .= \chr($this->type);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:7,代碼來源:SetEntityLinkPacket.php

示例2: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->target);
     $this->buffer .= Binary::writeLong($this->eid);
 }
開發者ID:kazuemon,項目名稱:NIGHTMARE,代碼行數:7,代碼來源:TakeItemEntityPacket.php

示例3: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->eid);
     $this->putUUID($this->clientId);
 }
開發者ID:kazuemon,項目名稱:NIGHTMARE,代碼行數:7,代碼來源:RemovePlayerPacket.php

示例4: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $meta = Binary::writeMetadata($this->metadata);
     $this->buffer .= $meta;
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:7,代碼來源:SetEntityDataPacket.php

示例5: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->from);
     $this->buffer .= Binary::writeLong($this->to);
     $this->buffer .= \chr($this->type);
 }
開發者ID:xpyctum,項目名稱:PocketMinePlusPlus,代碼行數:8,代碼來源:SetEntityLinkPacket.php

示例6: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->eid);
     $meta = Binary::writeMetadata($this->metadata);
     $this->buffer .= $meta;
 }
開發者ID:xpyctum,項目名稱:PocketMinePlusPlus,代碼行數:8,代碼來源:SetEntityDataPacket__32bit.php

示例7: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong(0);
     //TODO: remove
     $this->buffer .= \ENDIANNESS === 0 ? \pack("f", $this->x) : \strrev(\pack("f", $this->x));
     $this->buffer .= \ENDIANNESS === 0 ? \pack("f", $this->y) : \strrev(\pack("f", $this->y));
     $this->buffer .= \ENDIANNESS === 0 ? \pack("f", $this->z) : \strrev(\pack("f", $this->z));
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:9,代碼來源:RespawnPacket.php

示例8: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->eid);
     $this->putSlot($this->item);
     $this->buffer .= \chr($this->slot);
     $this->buffer .= \chr($this->selectedSlot);
 }
開發者ID:xpyctum,項目名稱:PocketMinePlusPlus,代碼行數:9,代碼來源:MobEquipmentPacket__32bit.php

示例9: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \pack("n", $this->item);
     $this->buffer .= \pack("n", $this->meta);
     $this->buffer .= \chr($this->slot);
     $this->buffer .= \chr($this->selectedSlot);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:9,代碼來源:PlayerEquipmentPacket.php

示例10: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \chr($this->slots[0]);
     $this->buffer .= \chr($this->slots[1]);
     $this->buffer .= \chr($this->slots[2]);
     $this->buffer .= \chr($this->slots[3]);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:9,代碼來源:PlayerArmorEquipmentPacket.php

示例11: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \pack("N", $this->x);
     $this->buffer .= \pack("N", $this->y);
     $this->buffer .= \pack("N", $this->z);
     $this->buffer .= \pack("N", $this->direction);
     $this->putString($this->title);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:10,代碼來源:AddPaintingPacket.php

示例12: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \pack("N", $this->action);
     $this->buffer .= \pack("N", $this->x);
     $this->buffer .= \pack("N", $this->y);
     $this->buffer .= \pack("N", $this->z);
     $this->buffer .= \pack("N", $this->face);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:10,代碼來源:PlayerActionPacket.php

示例13: encode

 public function encode()
 {
     $this->reset();
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \chr($this->eventId);
     $this->buffer .= \chr($this->effectId);
     $this->buffer .= \chr($this->amplifier);
     $this->buffer .= \chr($this->particles ? 1 : 0);
     $this->buffer .= \pack("N", $this->duration);
 }
開發者ID:Edwardthedog2,項目名稱:Steadfast2,代碼行數:10,代碼來源:MobEffectPacket.php

示例14: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->eid);
     $this->putSlot($this->slots[0]);
     $this->putSlot($this->slots[1]);
     $this->putSlot($this->slots[2]);
     $this->putSlot($this->slots[3]);
 }
開發者ID:kazuemon,項目名稱:NIGHTMARE,代碼行數:10,代碼來源:MobArmorEquipmentPacket.php

示例15: encode

 public function encode()
 {
     $this->buffer = \chr(self::NETWORK_ID);
     $this->offset = 0;
     $this->buffer .= Binary::writeLong($this->eid);
     $this->buffer .= \chr($this->eventId);
     $this->buffer .= \chr($this->effectId);
     $this->buffer .= \chr($this->amplifier);
     $this->buffer .= \chr($this->particles ? 1 : 0);
     $this->buffer .= \pack("N", $this->duration);
 }
開發者ID:xpyctum,項目名稱:PocketMinePlusPlus,代碼行數:11,代碼來源:MobEffectPacket.php


注:本文中的pocketmine\utils\Binary::writeLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。