mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
changed some packets + tried to make client join the server
This commit is contained in:
parent
7de564eea9
commit
a9be309de9
4 changed files with 41 additions and 13 deletions
|
|
@ -71,7 +71,7 @@ abstract class ProtocolInfo{
|
|||
const ADVENTURE_SETTINGS_PACKET = 0xb7;
|
||||
const ENTITY_DATA_PACKET = 0xb8;
|
||||
const PLAYER_INPUT_PACKET = 0xb9;
|
||||
//const FULL_CHUNK_DATA_PACKET = 0xba;
|
||||
const FULL_CHUNK_DATA_PACKET = 0xba;
|
||||
//const UNLOAD_CHUNK_PACKET = 0xbb;
|
||||
|
||||
}
|
||||
|
|
@ -85,4 +85,4 @@ abstract class ProtocolInfo{
|
|||
|
||||
/***REM_START***/
|
||||
require_once(FILE_PATH . "src/network/raknet/RakNetDataPacket.php");
|
||||
/***REM_END***/
|
||||
/***REM_END***/
|
||||
|
|
|
|||
21
src/network/protocol/packet/FullChunkDataPacket.php
Normal file
21
src/network/protocol/packet/FullChunkDataPacket.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
class FullChunkDataPacket extends RakNetDataPacket{
|
||||
public $chunkX;
|
||||
public $chunkZ;
|
||||
public $data;
|
||||
|
||||
public function pid(){
|
||||
return ProtocolInfo::FULL_CHUNK_DATA_PACKET;
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->put($this->data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,10 +5,8 @@ class StartGamePacket extends RakNetDataPacket{
|
|||
public $generator;
|
||||
public $gamemode;
|
||||
public $eid;
|
||||
public $x;
|
||||
public $y;
|
||||
public $z;
|
||||
|
||||
public $x, $y, $z;
|
||||
public $spawnX, $spawnY, $spawnZ;
|
||||
public function pid(){
|
||||
return ProtocolInfo::START_GAME_PACKET;
|
||||
}
|
||||
|
|
@ -23,9 +21,12 @@ class StartGamePacket extends RakNetDataPacket{
|
|||
$this->putInt($this->generator);
|
||||
$this->putInt($this->gamemode);
|
||||
$this->putInt($this->eid);
|
||||
$this->putInt($this->spawnX);
|
||||
$this->putInt($this->spawnY);
|
||||
$this->putInt($this->spawnZ);
|
||||
$this->putFloat($this->x);
|
||||
$this->putFloat($this->y);
|
||||
$this->putFloat($this->z);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue