-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump targeting minecraft version to 1.20.2 (#16)
- Loading branch information
Showing
10 changed files
with
122 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
pub mod listener; | ||
pub mod packet; | ||
|
||
#[repr(i32)] | ||
#[derive(Clone, Copy, PartialEq, Eq)] | ||
pub enum State { | ||
Handshaking = -1, | ||
Play = 0, | ||
Status = 1, | ||
Login = 2, | ||
Handshaking, | ||
Play, | ||
Status, | ||
Login, | ||
Configuration, | ||
} | ||
|
||
impl State { | ||
pub fn from_id(id: i32) -> Option<Self> { | ||
match id { | ||
-1 => Some(Self::Handshaking), | ||
0 => Some(Self::Play), | ||
1 => Some(Self::Status), | ||
2 => Some(Self::Login), | ||
_ => None, | ||
pub fn id(&self) -> &str { | ||
match self { | ||
State::Handshaking => "handshake", | ||
State::Play => "play", | ||
State::Status => "status", | ||
State::Login => "login", | ||
State::Configuration => "configuration", | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.