mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Fix online/max players being reversed on minecraft legacy 1.6
This commit is contained in:
parent
b09fa4ada5
commit
8c98433da9
2 changed files with 4 additions and 3 deletions
|
|
@ -4,7 +4,8 @@ Who knows what the future holds...
|
||||||
# 0.0.7 - ??/??/2022
|
# 0.0.7 - ??/??/2022
|
||||||
### Changes:
|
### Changes:
|
||||||
[Minecraft](https://www.minecraft.com) bedrock edition support.
|
[Minecraft](https://www.minecraft.com) bedrock edition support.
|
||||||
Also added a `query_legacy_specific` method to the mc game queries.
|
Fix Minecraft legacy v1.6 max/online players count being reversed.
|
||||||
|
Added `query_legacy_specific` method to the Minecraft protocol.
|
||||||
|
|
||||||
### Breaking:
|
### Breaking:
|
||||||
Removed `query_specific` from the mc protocol in favor of `query_java`, `query_legacy` and `query_legacy_specific`.
|
Removed `query_specific` from the mc protocol in favor of `query_java`, `query_legacy` and `query_legacy_specific`.
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,9 @@ impl LegacyV1_6 {
|
||||||
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
||||||
let version_name = split[1].to_string();
|
let version_name = split[1].to_string();
|
||||||
let description = split[2].to_string();
|
let description = split[2].to_string();
|
||||||
let max_players = split[3].parse()
|
let online_players = split[3].parse()
|
||||||
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
||||||
let online_players = split[4].parse()
|
let max_players = split[4].parse()
|
||||||
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
.map_err(|_| GDError::PacketBad("Failed to parse to expected int.".to_string()))?;
|
||||||
|
|
||||||
Ok(Response {
|
Ok(Response {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue