mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Basic Compatiable && Code Clean
This commit is contained in:
parent
d5a3a415b3
commit
153acc4002
6 changed files with 11 additions and 23 deletions
|
|
@ -7,11 +7,7 @@ class EntityDataPacket extends RakNetDataPacket{
|
|||
public $namedtag;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo8::ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::ENTITY_DATA_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ENTITY_DATA_PACKET;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ class PlayerInputPacket extends RakNetDataPacket{
|
|||
}
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::PLAYER_INPUT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::PLAYER_INPUT_PACKET;
|
||||
}
|
||||
return ProtocolInfo::PLAYER_INPUT_PACKET;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue