Add nms for 1.17 and 1.17.1 even if these version will not receive support and will not be tested.

Could not add nms for 1.16.5 bc of missing paper userdev.
This commit is contained in:
alexcrea 2024-08-10 05:15:22 +02:00
parent 2d5e83b87c
commit 4e1976b6bd
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
5 changed files with 83 additions and 7 deletions

View file

@ -19,19 +19,16 @@ object PacketManagerSelector {
ProtocoLibWrapper()
else
NoPacketManager()
private val versionSpecificManager: PacketManager?
private val versionSpecificManager: PacketManagerBase?
get() {
val versionParts = UpdateUtils.currentMinecraftVersion()
if (versionParts[0] != 1) return null;
if (versionParts[0] != 1) return null
return when (versionParts[1]) {
16 -> when (versionParts[2]) {
4, 5 -> null // TODO V1_16R3 (if possible)
else -> null
}
// Can't support 1.16.5 bc 1.16.5 paper userdev do not exist
17 -> when (versionParts[2]) {
0, 1 -> null // TODO V1_17R1 (if possible)
0, 1 -> V1_17R1_PacketManager()
else -> null
}