mirror of
https://github.com/ViaVersion/ViaLegacy.git
synced 2025-01-10 19:48:09 +01:00
Fixed LegacyProtocolVersion returning wrong ids when protocols overlap
This commit is contained in:
parent
46656e5f75
commit
122ceb8d1e
@ -75,10 +75,8 @@ public class LegacyProtocolVersion {
|
|||||||
return a - b;
|
return a - b;
|
||||||
}
|
}
|
||||||
// Both are legacy
|
// Both are legacy
|
||||||
a = -a;
|
final int baseProtocolA = getRealProtocolVersion(a);
|
||||||
b = -b;
|
final int baseProtocolB = getRealProtocolVersion(b);
|
||||||
final int baseProtocolA = a >> 2;
|
|
||||||
final int baseProtocolB = b >> 2;
|
|
||||||
if (baseProtocolA != baseProtocolB) {
|
if (baseProtocolA != baseProtocolB) {
|
||||||
return baseProtocolA - baseProtocolB;
|
return baseProtocolA - baseProtocolB;
|
||||||
}
|
}
|
||||||
@ -93,7 +91,7 @@ public class LegacyProtocolVersion {
|
|||||||
return protocolVersion;
|
return protocolVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -protocolVersion >> 2;
|
return -(protocolVersion >> 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user