Add some v1.16.5, v1.17, v1.17.1 types
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
pub mod v1_14_4;
|
||||
pub mod v1_16_5;
|
||||
pub mod v1_17;
|
||||
pub mod v1_17_1;
|
||||
|
||||
/// Trait to obtain packet ID from packet data.
|
||||
@@ -8,11 +10,15 @@ pub trait PacketId {
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! trait_packet_id (
|
||||
macro_rules! set_packet_id (
|
||||
($type: ident, $id: expr) => (
|
||||
impl $type {
|
||||
const PACKET_ID: u8 = $id;
|
||||
}
|
||||
|
||||
impl PacketId for $type {
|
||||
fn packet_id(&self) -> u8 {
|
||||
$id
|
||||
Self::PACKET_ID
|
||||
}
|
||||
}
|
||||
)
|
||||
|
Reference in New Issue
Block a user