当前位置: 首页>>代码示例>>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;未经允许,请勿转载。