mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
34 lines
No EOL
806 B
PHP
34 lines
No EOL
806 B
PHP
<?php
|
|
|
|
class SignUpdatePacket extends RakNetDataPacket{
|
|
public $x;
|
|
public $y;
|
|
public $z;
|
|
public $content;
|
|
|
|
public function pid(){
|
|
if($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
|
return ProtocolInfo6::SIGN_UPDATE_PACKET;
|
|
}elseif($this->PROTOCOL < ProtocolInfo9::SIGN_UPDATE_PACKET) {
|
|
return ProtocolInfo8::SIGN_UPDATE_PACKET;
|
|
}
|
|
return ProtocolInfo9::SIGN_UPDATE_PACKET;
|
|
}
|
|
|
|
public function decode(){
|
|
//$this->reset();
|
|
$this->x = $this->getShort();
|
|
$this->y = $this->getByte();
|
|
$this->z = $this->getShort();
|
|
$this->content = $this->getString();
|
|
}
|
|
|
|
public function encode(){
|
|
//$this->reset();
|
|
$this->putShort($this->x);
|
|
$this->putByte($this->y);
|
|
$this->putShort($this->z);
|
|
$this->putString($this->content);
|
|
}
|
|
|
|
} |