Skip to content

Commit

Permalink
protocol update for 1.19.63
Browse files Browse the repository at this point in the history
commit 9c98bed
Author: Benedikt05 <60869945+Benedikt05@users.noreply.github.com>
Date:   Fri Feb 24 20:18:51 2023 +0100

    start updating
  • Loading branch information
Benedikt05 committed Feb 24, 2023
1 parent 445405d commit 1a9b6b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
15 changes: 0 additions & 15 deletions src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -2207,21 +2207,6 @@ public function handleLogin(LoginPacket $packet) : bool{
true, //assume this is true? there's no field for it ...
$packet->clientData["OverrideSkin"] ?? true,
);
//TODO: REMOVE THIS
//Mojang forgot to bump the protocol version when they changed protocol in 1.19.62. Check the game version instead.
if(preg_match('/^(\d+)\.(\d+)\.(\d+)/', $packet->clientData["GameVersion"], $matches) !== 1){
throw new RuntimeException("Invalid game version format, expected at least 3 digits");
}
$major = (int) $matches[1];
$minor = (int) $matches[2];
$patch = (int) $matches[3];
if($major === 1 && $minor === 19 && $patch < 62){
$this->sendPlayStatus(PlayStatusPacket::LOGIN_FAILED_CLIENT, true);
//This pocketmine disconnect message will only be seen by the console (PlayStatusPacket causes the messages to be shown for the client)
$this->close("", "Incompatible Minecraft version (1.19.60)", false);

return true;
}

try{
$skin = SkinAdapterSingleton::get()->fromSkinData($skinData);
Expand Down
6 changes: 3 additions & 3 deletions src/pocketmine/network/mcpe/protocol/ProtocolInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ interface ProtocolInfo{
*/

/** Actual Minecraft: PE protocol version */
public const CURRENT_PROTOCOL = 567;
public const CURRENT_PROTOCOL = 568;
/** Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */
public const MINECRAFT_VERSION = 'v1.19.62';
public const MINECRAFT_VERSION = 'v1.19.63';
/** Version number sent to clients in ping responses. */
public const MINECRAFT_VERSION_NETWORK = '1.19.62';
public const MINECRAFT_VERSION_NETWORK = '1.19.63';

public const LOGIN_PACKET = 0x01;
public const PLAY_STATUS_PACKET = 0x02;
Expand Down

0 comments on commit 1a9b6b8

Please sign in to comment.