mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
unloadchunkpacket
This commit is contained in:
parent
d66ee05ae3
commit
034a45c25f
2 changed files with 29 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ abstract class ProtocolInfo{
|
|||
const ENTITY_DATA_PACKET = 0xb8;
|
||||
const PLAYER_INPUT_PACKET = 0xb9;
|
||||
const FULL_CHUNK_DATA_PACKET = 0xba;
|
||||
//const UNLOAD_CHUNK_PACKET = 0xbb;
|
||||
const UNLOAD_CHUNK_PACKET = 0xbb;
|
||||
|
||||
}
|
||||
/*Unused:
|
||||
|
|
|
|||
28
src/network/protocol/packet/UnloadChunkPacket.php
Normal file
28
src/network/protocol/packet/UnloadChunkPacket.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
class UnloadChunkPacket extends RakNetDataPacket
|
||||
{
|
||||
public $chunkX, $chunkZ;
|
||||
|
||||
public function __construct($chunkX = 0, $chunkZ = 0){
|
||||
$this->chunkX = $chunkX;
|
||||
$this->chunkZ = $chunkZ;
|
||||
}
|
||||
|
||||
public function encode()
|
||||
{
|
||||
$this->reset();
|
||||
$this->putInt($this->chunkX);
|
||||
$this->putInt($this->chunkZ);
|
||||
}
|
||||
|
||||
public function pid()
|
||||
{
|
||||
return ProtocolInfo::UNLOAD_CHUNK_PACKET;
|
||||
}
|
||||
|
||||
public function decode()
|
||||
{}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue