* Add Teams_VarInt packet variant for 1.13+ https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14150#Teams * Rename the variant for 1.9-1.12.2 to Teams_u8
This commit is contained in:
parent
45099165d9
commit
d1f88c9797
|
@ -1529,17 +1529,30 @@ state_packets!(
|
|||
field passengers: LenPrefixed<VarInt, VarInt> =,
|
||||
}
|
||||
/// Teams creates and updates teams
|
||||
packet Teams {
|
||||
packet Teams_VarInt {
|
||||
field name: String =,
|
||||
field mode: u8 =,
|
||||
field display_name: Option<String> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field prefix: Option<String> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field suffix: Option<String> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field flags: Option<u8> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field name_tag_visibility: Option<String> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field collision_rule: Option<String> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field color: Option<i8> = when(|p: &Teams| p.mode == 0 || p.mode == 2),
|
||||
field players: Option<LenPrefixed<VarInt, String>> = when(|p: &Teams| p.mode == 0 || p.mode == 3 || p.mode == 4),
|
||||
field display_name: Option<String> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field flags: Option<u8> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field name_tag_visibility: Option<String> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field collision_rule: Option<String> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field formatting: Option<VarInt> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field prefix: Option<String> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field suffix: Option<String> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 2),
|
||||
field players: Option<LenPrefixed<VarInt, String>> = when(|p: &Teams_VarInt| p.mode == 0 || p.mode == 3 || p.mode == 4),
|
||||
}
|
||||
packet Teams_u8 {
|
||||
field name: String =,
|
||||
field mode: u8 =,
|
||||
field data: Vec<u8> =,
|
||||
field display_name: Option<String> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field prefix: Option<String> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field suffix: Option<String> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field flags: Option<u8> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field name_tag_visibility: Option<String> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field collision_rule: Option<String> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field color: Option<i8> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 2),
|
||||
field players: Option<LenPrefixed<VarInt, String>> = when(|p: &Teams_u8| p.mode == 0 || p.mode == 3 || p.mode == 4),
|
||||
}
|
||||
packet Teams_NoVisColor {
|
||||
field name: String =,
|
||||
|
|
|
@ -101,7 +101,7 @@ protocol_packet_ids!(
|
|||
0x3d => SetExperience
|
||||
0x3e => UpdateHealth
|
||||
0x3f => ScoreboardObjective
|
||||
0x40 => Teams
|
||||
0x40 => Teams_u8
|
||||
0x41 => UpdateScore
|
||||
0x42 => SpawnPosition
|
||||
0x43 => TimeUpdate
|
||||
|
|
|
@ -125,7 +125,7 @@ protocol_packet_ids!(
|
|||
0x45 => UpdateHealth
|
||||
0x46 => ScoreboardObjective
|
||||
0x47 => SetPassengers
|
||||
0x48 => Teams
|
||||
0x48 => Teams_u8
|
||||
0x49 => UpdateScore
|
||||
0x4a => SpawnPosition
|
||||
0x4b => TimeUpdate
|
||||
|
|
|
@ -125,7 +125,7 @@ protocol_packet_ids!(
|
|||
0x45 => UpdateHealth
|
||||
0x46 => ScoreboardObjective
|
||||
0x47 => SetPassengers
|
||||
0x48 => Teams
|
||||
0x48 => Teams_u8
|
||||
0x49 => UpdateScore
|
||||
0x4a => SpawnPosition
|
||||
0x4b => TimeUpdate
|
||||
|
|
|
@ -105,7 +105,7 @@ protocol_packet_ids!(
|
|||
0x3e => UpdateHealth
|
||||
0x3f => ScoreboardObjective
|
||||
0x40 => SetPassengers
|
||||
0x41 => Teams
|
||||
0x41 => Teams_u8
|
||||
0x42 => UpdateScore
|
||||
0x43 => SpawnPosition
|
||||
0x44 => TimeUpdate
|
||||
|
|
|
@ -105,7 +105,7 @@ protocol_packet_ids!(
|
|||
0x3e => UpdateHealth
|
||||
0x3f => ScoreboardObjective
|
||||
0x40 => SetPassengers
|
||||
0x41 => Teams
|
||||
0x41 => Teams_u8
|
||||
0x42 => UpdateScore
|
||||
0x43 => SpawnPosition
|
||||
0x44 => TimeUpdate
|
||||
|
|
|
@ -111,7 +111,7 @@ protocol_packet_ids!(
|
|||
0x41 => UpdateHealth
|
||||
0x42 => ScoreboardObjective
|
||||
0x43 => SetPassengers
|
||||
0x44 => Teams
|
||||
0x44 => Teams_u8
|
||||
0x45 => UpdateScore
|
||||
0x46 => SpawnPosition
|
||||
0x47 => TimeUpdate
|
||||
|
|
|
@ -124,7 +124,7 @@ protocol_packet_ids!(
|
|||
0x44 => UpdateHealth
|
||||
0x45 => ScoreboardObjective
|
||||
0x46 => SetPassengers
|
||||
0x47 => Teams
|
||||
0x47 => Teams_VarInt
|
||||
0x48 => UpdateScore
|
||||
0x49 => SpawnPosition
|
||||
0x4a => TimeUpdate
|
||||
|
|
|
@ -131,7 +131,7 @@ protocol_packet_ids!(
|
|||
0x48 => UpdateHealth
|
||||
0x49 => ScoreboardObjective
|
||||
0x4a => SetPassengers
|
||||
0x4b => Teams
|
||||
0x4b => Teams_VarInt
|
||||
0x4c => UpdateScore
|
||||
0x4d => SpawnPosition
|
||||
0x4e => TimeUpdate
|
||||
|
|
|
@ -131,7 +131,7 @@ protocol_packet_ids!(
|
|||
0x48 => UpdateHealth
|
||||
0x49 => ScoreboardObjective
|
||||
0x4a => SetPassengers
|
||||
0x4b => Teams
|
||||
0x4b => Teams_VarInt
|
||||
0x4c => UpdateScore
|
||||
0x4d => SpawnPosition
|
||||
0x4e => TimeUpdate
|
||||
|
|
|
@ -131,7 +131,7 @@ protocol_packet_ids!(
|
|||
0x48 => UpdateHealth
|
||||
0x49 => ScoreboardObjective
|
||||
0x4a => SetPassengers
|
||||
0x4b => Teams
|
||||
0x4b => Teams_VarInt
|
||||
0x4c => UpdateScore
|
||||
0x4d => SpawnPosition
|
||||
0x4e => TimeUpdate
|
||||
|
|
|
@ -131,7 +131,7 @@ protocol_packet_ids!(
|
|||
0x48 => UpdateHealth
|
||||
0x49 => ScoreboardObjective
|
||||
0x4a => SetPassengers
|
||||
0x4b => Teams
|
||||
0x4b => Teams_VarInt
|
||||
0x4c => UpdateScore
|
||||
0x4d => SpawnPosition
|
||||
0x4e => TimeUpdate
|
||||
|
|
|
@ -131,7 +131,7 @@ protocol_packet_ids!(
|
|||
0x48 => UpdateHealth
|
||||
0x49 => ScoreboardObjective
|
||||
0x4a => SetPassengers
|
||||
0x4b => Teams
|
||||
0x4b => Teams_VarInt
|
||||
0x4c => UpdateScore
|
||||
0x4d => SpawnPosition
|
||||
0x4e => TimeUpdate
|
||||
|
|
|
@ -98,7 +98,7 @@ protocol_packet_ids!(
|
|||
0x3b => ScoreboardObjective
|
||||
0x3c => UpdateScore
|
||||
0x3d => ScoreboardDisplay
|
||||
0x3e => Teams
|
||||
0x3e => Teams_u8
|
||||
0x3f => PluginMessageClientbound
|
||||
0x40 => Disconnect
|
||||
0x41 => ServerDifficulty
|
||||
|
|
|
@ -105,7 +105,7 @@ protocol_packet_ids!(
|
|||
0x3e => UpdateHealth
|
||||
0x3f => ScoreboardObjective
|
||||
0x40 => SetPassengers
|
||||
0x41 => Teams
|
||||
0x41 => Teams_u8
|
||||
0x42 => UpdateScore
|
||||
0x43 => SpawnPosition
|
||||
0x44 => TimeUpdate
|
||||
|
|
|
@ -105,7 +105,7 @@ protocol_packet_ids!(
|
|||
0x3e => UpdateHealth
|
||||
0x3f => ScoreboardObjective
|
||||
0x40 => SetPassengers
|
||||
0x41 => Teams
|
||||
0x41 => Teams_u8
|
||||
0x42 => UpdateScore
|
||||
0x43 => SpawnPosition
|
||||
0x44 => TimeUpdate
|
||||
|
|
Loading…
Reference in New Issue