Minecraft 26.2-snapshot-7 support

This commit is contained in:
md_5
2026-05-13 20:40:49 +10:00
parent 2c270f0937
commit c21769b06c
3 changed files with 11 additions and 2 deletions
@@ -55,7 +55,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_21_9 = 773;
public static final int MINECRAFT_1_21_11 = 774;
public static final int MINECRAFT_26_1 = 775;
public static final int MINECRAFT_26_2 = 1073742136;
public static final int MINECRAFT_26_2 = 1073742137;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;
@@ -42,6 +42,7 @@ public class Login extends DefinedPacket
private Location deathLocation;
private int portalCooldown;
private int seaLevel;
private boolean onlineMode;
private boolean secureProfile;
@Override
@@ -166,6 +167,10 @@ public class Login extends DefinedPacket
{
seaLevel = readVarInt( buf );
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_26_2 )
{
onlineMode = buf.readBoolean();
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 )
{
secureProfile = buf.readBoolean();
@@ -301,6 +306,10 @@ public class Login extends DefinedPacket
{
writeVarInt( seaLevel, buf );
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_26_2 )
{
buf.writeBoolean( onlineMode );
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 )
{
buf.writeBoolean( secureProfile );