mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-19 01:44:06 +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 = new ChunkDataPacket;
|
||||||
$pk->x = $X;
|
$pk->chunkX = $X;
|
||||||
$pk->z = $Z;
|
$pk->chunkZ = $Z;
|
||||||
$pk->data = $this->level->getOrderedChunk($X, $Z, $Yndex);
|
$pk->data = $this->level->getOrderedChunk($X, $Z, $Yndex);
|
||||||
$cnt = $this->dataPacket($pk);
|
$cnt = $this->dataPacket($pk);
|
||||||
if($cnt === false){
|
if($cnt === false){
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class ChunkDataPacket extends RakNetDataPacket{
|
class ChunkDataPacket extends RakNetDataPacket{
|
||||||
public $x;
|
public $chunkX;
|
||||||
public $z;
|
public $chunkZ;
|
||||||
public $data;
|
public $data;
|
||||||
|
|
||||||
public function pid(){
|
public function pid(){
|
||||||
@ -34,8 +34,8 @@ class ChunkDataPacket extends RakNetDataPacket{
|
|||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putInt($this->x);
|
$this->putInt($this->chunkX);
|
||||||
$this->putInt($this->z);
|
$this->putInt($this->chunkZ);
|
||||||
$this->put($this->data);
|
$this->put($this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,16 +20,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class RequestChunkPacket extends RakNetDataPacket{
|
class RequestChunkPacket extends RakNetDataPacket{
|
||||||
public $x;
|
public $chunkX;
|
||||||
public $z;
|
public $chunkZ;
|
||||||
|
|
||||||
public function pid(){
|
public function pid(){
|
||||||
return ProtocolInfo::REQUEST_CHUNK_PACKET;
|
return ProtocolInfo::REQUEST_CHUNK_PACKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function decode(){
|
public function decode(){
|
||||||
$this->x = $this->getInt();
|
$this->chunkX = $this->getInt();
|
||||||
$this->z = $this->getInt();
|
$this->chunkZ = $this->getInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user