本文整理汇总了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);
}
示例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);
}
示例3: encode
public function encode()
{
$this->buffer = \chr(self::NETWORK_ID);
$this->offset = 0;
$this->buffer .= Binary::writeLong($this->eid);
$this->putUUID($this->clientId);
}
示例4: encode
public function encode()
{
$this->reset();
$this->buffer .= Binary::writeLong($this->eid);
$meta = Binary::writeMetadata($this->metadata);
$this->buffer .= $meta;
}
示例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);
}
示例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;
}
示例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));
}
示例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);
}
示例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);
}
示例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]);
}
示例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);
}
示例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);
}
示例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);
}
示例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]);
}
示例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);
}