1.15.2 (578) protocol support (#338)
v1_15 is now used for both 1.15.1 and 1.15.2. No protocol changes except ChangeGameState reason code values
This commit is contained in:
parent
e0d5d205c1
commit
85b9774f21
|
@ -23,6 +23,7 @@ Join with your favorite IRC client or [Matrix](https://matrix.to/#/#_espernet_#s
|
||||||
|
|
||||||
| Game version | Protocol version | Supported? |
|
| Game version | Protocol version | Supported? |
|
||||||
| ------ | --- | --- |
|
| ------ | --- | --- |
|
||||||
|
| 1.15.2 | 578 | ✓ |
|
||||||
| 1.15.1 | 575 | ✓ |
|
| 1.15.1 | 575 | ✓ |
|
||||||
| 1.14.4 | 498 | ✓ |
|
| 1.14.4 | 498 | ✓ |
|
||||||
| 1.14.3 | 490 | ✓ |
|
| 1.14.3 | 490 | ✓ |
|
||||||
|
|
|
@ -43,8 +43,8 @@ use std::net::TcpStream;
|
||||||
use std::sync::atomic::{AtomicBool, AtomicI32, Ordering};
|
use std::sync::atomic::{AtomicBool, AtomicI32, Ordering};
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
pub const SUPPORTED_PROTOCOLS: [i32; 18] = [
|
pub const SUPPORTED_PROTOCOLS: [i32; 19] = [
|
||||||
575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315, 210, 109, 107, 74, 47, 5,
|
578, 575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315, 210, 109, 107, 74, 47, 5,
|
||||||
];
|
];
|
||||||
|
|
||||||
static CURRENT_PROTOCOL_VERSION: AtomicI32 = AtomicI32::new(SUPPORTED_PROTOCOLS[0]);
|
static CURRENT_PROTOCOL_VERSION: AtomicI32 = AtomicI32::new(SUPPORTED_PROTOCOLS[0]);
|
||||||
|
|
|
@ -12,7 +12,7 @@ mod v1_14_1;
|
||||||
mod v1_14_2;
|
mod v1_14_2;
|
||||||
mod v1_14_3;
|
mod v1_14_3;
|
||||||
mod v1_14_4;
|
mod v1_14_4;
|
||||||
mod v1_15_1;
|
mod v1_15;
|
||||||
mod v1_7_10;
|
mod v1_7_10;
|
||||||
mod v1_8_9;
|
mod v1_8_9;
|
||||||
mod v1_9;
|
mod v1_9;
|
||||||
|
@ -24,6 +24,7 @@ mod v1_9_2;
|
||||||
pub fn protocol_name_to_protocol_version(s: String) -> i32 {
|
pub fn protocol_name_to_protocol_version(s: String) -> i32 {
|
||||||
match s.as_ref() {
|
match s.as_ref() {
|
||||||
"" => SUPPORTED_PROTOCOLS[0],
|
"" => SUPPORTED_PROTOCOLS[0],
|
||||||
|
"1.15.2" => 578,
|
||||||
"1.15.1" => 575,
|
"1.15.1" => 575,
|
||||||
"1.14.4" => 498,
|
"1.14.4" => 498,
|
||||||
"1.14.3" => 490,
|
"1.14.3" => 490,
|
||||||
|
@ -60,7 +61,8 @@ pub fn translate_internal_packet_id_for_version(
|
||||||
to_internal: bool,
|
to_internal: bool,
|
||||||
) -> i32 {
|
) -> i32 {
|
||||||
match version {
|
match version {
|
||||||
575 => v1_15_1::translate_internal_packet_id(state, dir, id, to_internal),
|
578 => v1_15::translate_internal_packet_id(state, dir, id, to_internal),
|
||||||
|
575 => v1_15::translate_internal_packet_id(state, dir, id, to_internal),
|
||||||
498 => v1_14_4::translate_internal_packet_id(state, dir, id, to_internal),
|
498 => v1_14_4::translate_internal_packet_id(state, dir, id, to_internal),
|
||||||
490 => v1_14_3::translate_internal_packet_id(state, dir, id, to_internal),
|
490 => v1_14_3::translate_internal_packet_id(state, dir, id, to_internal),
|
||||||
485 => v1_14_2::translate_internal_packet_id(state, dir, id, to_internal),
|
485 => v1_14_2::translate_internal_packet_id(state, dir, id, to_internal),
|
||||||
|
|
Loading…
Reference in New Issue