Before only Clientbound Packet IDs where parsed from JSON, Now Serverbound Packet IDs are parsed from JSON as well. This makes porting to new minecraft version much easier
15 lines
286 B
Rust
15 lines
286 B
Rust
use pumpkin_macros::server_packet;
|
|
use serde::Deserialize;
|
|
|
|
use crate::VarInt;
|
|
|
|
#[derive(Deserialize)]
|
|
#[server_packet("play:use_item")]
|
|
pub struct SUseItem {
|
|
// 0 for main hand, 1 for off hand
|
|
pub hand: VarInt,
|
|
pub sequence: VarInt,
|
|
pub yaw: f32,
|
|
pub pitch: f32,
|
|
}
|