mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Updated chunk packet field names
This commit is contained in:
parent
f1245a551e
commit
8de39db59d
@ -218,8 +218,8 @@ class Player{
|
||||
}
|
||||
}
|
||||
$pk = new ChunkDataPacket;
|
||||
$pk->x = $X;
|
||||
$pk->z = $Z;
|
||||
$pk->chunkX = $X;
|
||||
$pk->chunkZ = $Z;
|
||||
$pk->data = $this->level->getOrderedChunk($X, $Z, $Yndex);
|
||||
$cnt = $this->dataPacket($pk);
|
||||
if($cnt === false){
|
||||
|
@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
class ChunkDataPacket extends RakNetDataPacket{
|
||||
public $x;
|
||||
public $z;
|
||||
public $chunkX;
|
||||
public $chunkZ;
|
||||
public $data;
|
||||
|
||||
public function pid(){
|
||||
@ -34,8 +34,8 @@ class ChunkDataPacket extends RakNetDataPacket{
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->z);
|
||||
$this->putInt($this->chunkX);
|
||||
$this->putInt($this->chunkZ);
|
||||
$this->put($this->data);
|
||||
}
|
||||
|
||||
|
@ -20,16 +20,16 @@
|
||||
*/
|
||||
|
||||
class RequestChunkPacket extends RakNetDataPacket{
|
||||
public $x;
|
||||
public $z;
|
||||
public $chunkX;
|
||||
public $chunkZ;
|
||||
|
||||
public function pid(){
|
||||
return ProtocolInfo::REQUEST_CHUNK_PACKET;
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
$this->x = $this->getInt();
|
||||
$this->z = $this->getInt();
|
||||
$this->chunkX = $this->getInt();
|
||||
$this->chunkZ = $this->getInt();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user