Split UseEntity_Hand

This commit is contained in:
ice_iix 2020-06-27 17:39:44 -07:00
parent 94032279be
commit a411f949df
17 changed files with 21 additions and 21 deletions

View File

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

View File

@ -17,7 +17,7 @@ protocol_packet_ids!(
0x06 => ClickWindow_u8
0x07 => CloseWindow
0x08 => PluginMessageServerbound
0x09 => UseEntity
0x09 => UseEntity_Hand
0x0a => KeepAliveServerbound_VarInt
0x0b => PlayerPosition
0x0c => PlayerPositionLook

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0c => QueryEntityNBT
0x0d => UseEntity
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
0x0f => Player
0x10 => PlayerPosition

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0c => QueryEntityNBT
0x0d => UseEntity
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
0x0f => Player
0x10 => PlayerPosition

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow
0x08 => CloseWindow
0x09 => PluginMessageServerbound
0x0a => UseEntity
0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition
0x0d => PlayerPositionLook

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow
0x08 => CloseWindow
0x09 => PluginMessageServerbound
0x0a => UseEntity
0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition
0x0d => PlayerPositionLook

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow
0x08 => CloseWindow
0x09 => PluginMessageServerbound
0x0a => UseEntity
0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_i64
0x0c => Player
0x0d => PlayerPosition

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0c => QueryEntityNBT
0x0d => UseEntity
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
0x0f => Player
0x10 => PlayerPosition

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow
0x08 => CloseWindow
0x09 => PluginMessageServerbound
0x0a => UseEntity
0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition
0x0d => PlayerPositionLook

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow
0x08 => CloseWindow
0x09 => PluginMessageServerbound
0x0a => UseEntity
0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition
0x0d => PlayerPositionLook