Add UseEntity_Sneakflag

This commit is contained in:
ice_iix 2020-06-27 17:42:20 -07:00
parent a411f949df
commit 65d9966ef7
2 changed files with 10 additions and 1 deletions

View File

@ -179,6 +179,15 @@ state_packets!(
}
/// UseEntity is sent when the user interacts (right clicks) or attacks
/// (left clicks) an entity.
packet UseEntity_Sneakflag {
field target_id: VarInt =,
field ty: VarInt =,
field target_x: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field target_y: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field target_z: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field hand: VarInt = when(|p: &UseEntity_Sneakflag| p.ty.0 == 0 || p.ty.0 == 2),
field sneaking: bool =,
}
packet UseEntity_Hand {
field target_id: VarInt =,
field ty: VarInt =,

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand // TODO
0x0e => UseEntity_Sneakflag
//0x0f => GenerateStructure // TODO
0x10 => KeepAliveServerbound_i64
0x11 => LockDifficulty