mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Update correct encoding for GameType reading
This commit is contained in:
parent
67df108f28
commit
9bc7fd8930
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ public enum GameMode implements GameEventValue {
|
|||
private static final GameMode[] VALUES = values();
|
||||
|
||||
public static GameMode byId(int id) {
|
||||
return VALUES[id];
|
||||
// Yes, the way this is read is intentional. Don't remove it. As of 1.19.3.
|
||||
// If the BY_ID field still exists in the vanilla sources, don't remove this.
|
||||
return id >= 0 && id < VALUES.length ? VALUES[id] : VALUES[0];
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Reference in a new issue