Update snapshot support to 1.18-pre1
This commit is contained in:
parent
c3fffbc919
commit
c0c9b28582
@ -36,7 +36,7 @@ public class ProtocolConstants
|
|||||||
public static final int MINECRAFT_1_16_4 = 754;
|
public static final int MINECRAFT_1_16_4 = 754;
|
||||||
public static final int MINECRAFT_1_17 = 755;
|
public static final int MINECRAFT_1_17 = 755;
|
||||||
public static final int MINECRAFT_1_17_1 = 756;
|
public static final int MINECRAFT_1_17_1 = 756;
|
||||||
public static final int MINECRAFT_1_18 = 1073741868;
|
public static final int MINECRAFT_1_18 = 1073741873;
|
||||||
public static final List<String> SUPPORTED_VERSIONS;
|
public static final List<String> SUPPORTED_VERSIONS;
|
||||||
public static final List<Integer> SUPPORTED_VERSION_IDS;
|
public static final List<Integer> SUPPORTED_VERSION_IDS;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ public class ClientSettings extends DefinedPacket
|
|||||||
private byte skinParts;
|
private byte skinParts;
|
||||||
private int mainHand;
|
private int mainHand;
|
||||||
private boolean disableTextFiltering;
|
private boolean disableTextFiltering;
|
||||||
|
private boolean allowServerListing;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
@ -41,6 +42,10 @@ public class ClientSettings extends DefinedPacket
|
|||||||
{
|
{
|
||||||
disableTextFiltering = buf.readBoolean();
|
disableTextFiltering = buf.readBoolean();
|
||||||
}
|
}
|
||||||
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_18 )
|
||||||
|
{
|
||||||
|
allowServerListing = buf.readBoolean();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -65,6 +70,10 @@ public class ClientSettings extends DefinedPacket
|
|||||||
{
|
{
|
||||||
buf.writeBoolean( disableTextFiltering );
|
buf.writeBoolean( disableTextFiltering );
|
||||||
}
|
}
|
||||||
|
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_18 )
|
||||||
|
{
|
||||||
|
buf.writeBoolean( allowServerListing );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user