mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Support MCPE 0.3.2 - 0.6.0
This commit is contained in:
parent
6cfc8f1385
commit
e428f39736
21 changed files with 1079 additions and 139 deletions
|
|
@ -5,7 +5,9 @@ class SetEntityDataPacket extends RakNetDataPacket{
|
|||
public $metadata;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::SET_ENTITY_DATA_PACKET;
|
||||
}
|
||||
return ProtocolInfo::SET_ENTITY_DATA_PACKET;
|
||||
|
|
@ -17,6 +19,7 @@ class SetEntityDataPacket extends RakNetDataPacket{
|
|||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
if($this->PROTOCOL >= ProtocolInfo7::CURRENT_PROTOCOL_7)
|
||||
$this->putInt($this->eid);
|
||||
$this->put(Utils::writeMetadata($this->metadata));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue