Browse Source

1.17.1 (756) protocol (#605)

https://wiki.vg/index.php?title=Protocol&oldid=16918

New and changed packets:
* 1.17.1 packet id shifts, new clientbound packets
* Add WindowPong new packet serverbound
* Add Tags_Nested packet variant
* Add TeleportPlayer_WithDismount packet variant
* Add ChunkData_Biomes3D_Bitmasks packet variant 
* Add WindowItems_StateCarry variant, split WindowItems_i16
* Add WindowSetSlot_State packet variant
* Add Explosion_VarInt packet variant
* Add UpdateLight_Arrays variant
* Add ResourcePackSend_Prompt variant
* Add SpawnPosition_Angle variant
* Add EntityProperties_VarIntVarInt variant, using VarInts in both fields 
* Add ClientSettings_Filtering variant
* Add ClickWindow_State variant
* Add EditBook packet variant 
* Fix many Particle packet variant definitions

* server: handle TeleportPlayer_WithDismount
* server: handle ChunkData_Biomes3D_Bitmasks

* world: add num_sections to self.load_chunk19_or_115
* world: load_chunk19_to_117: accept 64-bit mask

* metadata: add PoseData::LongJumping 

* protocol: update Cargo.lock for serde_json 1.0.130
* build: pin to wasm-pack 0.10.0
pull/607/head
iceiix 2 months ago
committed by GitHub
parent
commit
cfcc7d2a1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/build.yaml
  2. 1
      README.md
  3. 4
      protocol/Cargo.lock
  4. 6
      protocol/src/protocol/mod.rs
  5. 282
      protocol/src/protocol/packet.rs
  6. 3
      protocol/src/protocol/versions.rs
  7. 8
      protocol/src/protocol/versions/v15w39c.rs
  8. 14
      protocol/src/protocol/versions/v18w50a.rs
  9. 14
      protocol/src/protocol/versions/v19w02a.rs
  10. 8
      protocol/src/protocol/versions/v1_10_2.rs
  11. 8
      protocol/src/protocol/versions/v1_11_2.rs
  12. 8
      protocol/src/protocol/versions/v1_12_2.rs
  13. 12
      protocol/src/protocol/versions/v1_13_2.rs
  14. 14
      protocol/src/protocol/versions/v1_14.rs
  15. 14
      protocol/src/protocol/versions/v1_14_1.rs
  16. 14
      protocol/src/protocol/versions/v1_14_2.rs
  17. 14
      protocol/src/protocol/versions/v1_14_3.rs
  18. 14
      protocol/src/protocol/versions/v1_14_4.rs
  19. 12
      protocol/src/protocol/versions/v1_15.rs
  20. 12
      protocol/src/protocol/versions/v1_16_1.rs
  21. 12
      protocol/src/protocol/versions/v1_16_4.rs
  22. 190
      protocol/src/protocol/versions/v1_17_1.rs
  23. 4
      protocol/src/protocol/versions/v1_7_10.rs
  24. 8
      protocol/src/protocol/versions/v1_8_9.rs
  25. 8
      protocol/src/protocol/versions/v1_9.rs
  26. 8
      protocol/src/protocol/versions/v1_9_2.rs
  27. 2
      protocol/src/types/metadata.rs
  28. 34
      src/server/mod.rs
  29. 35
      src/world/mod.rs

2
.github/workflows/build.yaml

@ -134,7 +134,7 @@ jobs:
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'latest'
version: 'v0.10.0'
- name: Build binary
run: |
rustup target add wasm32-unknown-unknown

1
README.md

@ -24,6 +24,7 @@ Discussion forum: [https://github.com/iceiix/stevenarella/discussions](https://g
| Game version | Protocol version | Supported? |
| ------ | --- | --- |
| 1.17.1 | 756 | ✓ |
| 1.16.5 | 754 | ✓ |
| 1.16.4 | 754 | ✓ |
| 1.16.3 | 753 | ✓ |

4
protocol/Cargo.lock

@ -778,9 +778,9 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.127"
version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
[[package]]
name = "serde_json"

6
protocol/src/protocol/mod.rs

@ -39,9 +39,9 @@ use std::io::{Read, Write};
use std::net::TcpStream;
use std::sync::atomic::{AtomicBool, AtomicI32, Ordering};
pub const SUPPORTED_PROTOCOLS: [i32; 24] = [
754, 753, 751, 736, 735, 578, 575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315, 210,
109, 107, 74, 47, 5,
pub const SUPPORTED_PROTOCOLS: [i32; 25] = [
756, 754, 753, 751, 736, 735, 578, 575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315,
210, 109, 107, 74, 47, 5,
];
static CURRENT_PROTOCOL_VERSION: AtomicI32 = AtomicI32::new(SUPPORTED_PROTOCOLS[0]);

282
protocol/src/protocol/packet.rs

@ -89,6 +89,15 @@ state_packets!(
field action_id: u8=,
}
/// ClientSettings is sent by the client to update its current settings.
packet ClientSettings_Filtering {
field locale: String =,
field view_distance: u8 =,
field chat_mode: VarInt =,
field chat_colors: bool =,
field displayed_skin_parts: u8 =,
field main_hand: VarInt =,
field disable_text_filtering: bool =,
}
packet ClientSettings {
field locale: String =,
field view_distance: u8 =,
@ -137,6 +146,15 @@ state_packets!(
field button: u8 =,
}
/// ClickWindow is sent when the client clicks in a window.
packet ClickWindow_State {
field id: u8 =,
field slot: i16 =,
field state: VarInt =,
field button: u8 =,
field mode: VarInt =,
field slots: LenPrefixed<VarInt, packet::NumberedSlot> =,
field clicked_item: Option<item::Stack> =,
}
packet ClickWindow {
field id: u8 =,
field slot: i16 =,
@ -168,7 +186,12 @@ state_packets!(
field channel: String =,
field data: LenPrefixedBytes<VarShort> =,
}
packet EditBook {
packet EditBook_Pages {
field hand: VarInt =,
field pages: LenPrefixed<VarInt, String> =,
field title: Option<String> =,
}
packet EditBook_Item {
field new_book: Option<item::Stack> =,
field is_signing: bool =,
field hand: VarInt =,
@ -346,6 +369,9 @@ state_packets!(
field jump: bool =,
field unmount: bool =,
}
packet WindowPong {
field id: i32 =,
}
/// CraftingBookData is sent when the player interacts with the crafting book.
packet CraftingBookData {
field action: VarInt =,
@ -777,6 +803,13 @@ state_packets!(
field metadata: types::Metadata =,
}
packet SculkVibrationSignal {
field source_position: Position =,
field dest_id: String =,
field dest_position: Position = when(|p: &SculkVibrationSignal| p.dest_id == "block"),
field entity_id: VarInt = when(|p: &SculkVibrationSignal| p.dest_id == "entity"),
}
/// Animation is sent by the server to play an animation on a specific entity.
packet Animation {
field entity_id: VarInt =,
@ -890,6 +923,11 @@ state_packets!(
packet ServerMessage_NoPosition {
field message: format::Component =,
}
packet ClearTitles {
field json_data: String =,
field position: u8 =,
field sender: UUID =,
}
/// MultiBlockChange is used to update a batch of blocks in a single packet.
packet MultiBlockChange_Packed {
field chunk_section_pos: u64 =,
@ -935,6 +973,16 @@ state_packets!(
field number_of_slots: VarInt =,
field entity_id: i32 =,
}
packet WorldBorderInit {
field x: f64 =,
field z: f64 =,
field old_diameter: f64 =,
field new_diameter: f64 =,
field speed: VarLong =,
field portal_teleport_boundary: VarInt =,
field warning_blocks: VarInt =,
field warning_time: VarInt =,
}
packet WindowOpen_u8 {
field id: u8 =,
field ty: u8 =,
@ -949,7 +997,13 @@ state_packets!(
field title: format::Component =,
}
/// WindowItems sets every item in a window.
packet WindowItems {
packet WindowItems_StateCarry {
field id: u8 =,
field state_id: VarInt =,
field items: LenPrefixed<VarInt, Option<item::Stack>> =,
field carried_item: Option<item::Stack> =,
}
packet WindowItems_i16 {
field id: u8 =,
field items: LenPrefixed<i16, Option<item::Stack>> =,
}
@ -961,6 +1015,12 @@ state_packets!(
field value: i16 =,
}
/// WindowSetSlot changes an itemstack in one of the slots in a window.
packet WindowSetSlot_State {
field id: u8 =,
field state_id: VarInt =,
field property: i16 =,
field item: Option<item::Stack> =,
}
packet WindowSetSlot {
field id: u8 =,
field property: i16 =,
@ -1021,7 +1081,17 @@ state_packets!(
}
/// Explosion is sent when an explosion is triggered (tnt, creeper etc).
/// This plays the effect and removes the effected blocks.
packet Explosion {
packet Explosion_VarInt {
field x: f32 =,
field y: f32 =,
field z: f32 =,
field radius: f32 =,
field records: LenPrefixed<VarInt, packet::ExplosionRecord> =,
field velocity_x: f32 =,
field velocity_y: f32 =,
field velocity_z: f32 =,
}
packet Explosion_i32 {
field x: f32 =,
field y: f32 =,
field z: f32 =,
@ -1062,6 +1132,15 @@ state_packets!(
}
/// ChunkData sends or updates a single chunk on the client. If New is set
/// then biome data should be sent too.
packet ChunkData_Biomes3D_Bitmasks {
field chunk_x: i32 =,
field chunk_z: i32 =,
field bitmasks: LenPrefixed<VarInt, i64> =,
field heightmaps: Option<nbt::NamedTag> =,
field biomes: LenPrefixed<VarInt, VarInt> =,
field data: LenPrefixedBytes<VarInt> =,
field block_entities: LenPrefixed<VarInt, Option<nbt::NamedTag>> =,
}
packet ChunkData_Biomes3D_VarInt {
field chunk_x: i32 =,
field chunk_z: i32 =,
@ -1166,39 +1245,31 @@ state_packets!(
field particle_id: i32 =,
field long_distance: bool =,
field x: f64 =,
field y: f64=,
field y: f64 =,
field z: f64 =,
field offset_x: f32 =,
field offset_y: f32 =,
field offset_z: f32 =,
field speed: f32 =,
field count: i32 =,
field block_state: VarInt = when(|p: &Particle_f64| p.particle_id == 3 || p.particle_id == 23),
field red: f32 = when(|p: &Particle_f64| p.particle_id == 14),
field green: f32 = when(|p: &Particle_f64| p.particle_id == 14),
field blue: f32 = when(|p: &Particle_f64| p.particle_id == 14),
field scale: f32 = when(|p: &Particle_f64| p.particle_id == 14),
field item: Option<nbt::NamedTag> = when(|p: &Particle_f64| p.particle_id == 32),
}
packet Particle_Data {
field particle_id: i32 =,
field long_distance: bool =,
field x: f32 =,
field y: f32 =,
field z: f32 =,
field offset_x: f32 =,
field offset_y: f32 =,
field offset_z: f32 =,
field speed: f32 =,
field count: i32 =,
field block_state: VarInt = when(|p: &Particle_Data| p.particle_id == 3 || p.particle_id == 23),
field red: f32 = when(|p: &Particle_Data| p.particle_id == 14),
field green: f32 = when(|p: &Particle_Data| p.particle_id == 14),
field blue: f32 = when(|p: &Particle_Data| p.particle_id == 14),
field scale: f32 = when(|p: &Particle_Data| p.particle_id == 14),
field item: Option<nbt::NamedTag> = when(|p: &Particle_Data| p.particle_id == 32),
}
packet Particle_Data13 {
field block_state: VarInt = when(|p: &Particle_f64| p.particle_id == 4 || p.particle_id == 25),
field red: f32 = when(|p: &Particle_f64| p.particle_id == 15 || p.particle_id == 16),
field green: f32 = when(|p: &Particle_f64| p.particle_id == 15 || p.particle_id == 16),
field blue: f32 = when(|p: &Particle_f64| p.particle_id == 15 || p.particle_id == 16),
field scale: f32 = when(|p: &Particle_f64| p.particle_id == 15 || p.particle_id == 16),
field to_red: f32 = when(|p: &Particle_f64| p.particle_id == 16),
field to_green: f32 = when(|p: &Particle_f64| p.particle_id == 16),
field to_blue: f32 = when(|p: &Particle_f64| p.particle_id == 16),
field item: Option<nbt::NamedTag> = when(|p: &Particle_f64| p.particle_id == 36),
field origin_x: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field origin_y: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field origin_z: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field dest_x: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field dest_y: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field dest_z: f64 = when(|p: &Particle_f64| p.particle_id == 37),
field ticks: f64 = when(|p: &Particle_f64| p.particle_id == 37),
}
packet Particle_f32 {
field particle_id: i32 =,
field long_distance: bool =,
field x: f32 =,
@ -1209,12 +1280,22 @@ state_packets!(
field offset_z: f32 =,
field speed: f32 =,
field count: i32 =,
field block_state: VarInt = when(|p: &Particle_Data13| p.particle_id == 3 || p.particle_id == 20),
field red: f32 = when(|p: &Particle_Data13| p.particle_id == 11),
field green: f32 = when(|p: &Particle_Data13| p.particle_id == 11),
field blue: f32 = when(|p: &Particle_Data13| p.particle_id == 11),
field scale: f32 = when(|p: &Particle_Data13| p.particle_id == 11),
field item: Option<nbt::NamedTag> = when(|p: &Particle_Data13| p.particle_id == 27),
field block_state: VarInt = when(|p: &Particle_f32| p.particle_id == 4 || p.particle_id == 25),
field red: f32 = when(|p: &Particle_f32| p.particle_id == 15 || p.particle_id == 16),
field green: f32 = when(|p: &Particle_f32| p.particle_id == 15 || p.particle_id == 16),
field blue: f32 = when(|p: &Particle_f32| p.particle_id == 15 || p.particle_id == 16),
field scale: f32 = when(|p: &Particle_f32| p.particle_id == 15 || p.particle_id == 16),
field to_red: f32 = when(|p: &Particle_f32| p.particle_id == 16),
field to_green: f32 = when(|p: &Particle_f32| p.particle_id == 16),
field to_blue: f32 = when(|p: &Particle_f32| p.particle_id == 16),
field item: Option<nbt::NamedTag> = when(|p: &Particle_f32| p.particle_id == 36),
field origin_x: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field origin_y: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field origin_z: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field dest_x: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field dest_y: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field dest_z: f64 = when(|p: &Particle_f32| p.particle_id == 37),
field ticks: f64 = when(|p: &Particle_f32| p.particle_id == 37),
}
packet Particle_VarIntArray {
field particle_id: i32 =,
@ -1519,6 +1600,9 @@ state_packets!(
field y: i32 =,
field z: i32 =,
}
packet WindowPing {
field id: i32 =,
}
/// CraftRecipeResponse is a response to CraftRecipeRequest, notifies the UI.
packet CraftRecipeResponse {
field window_id: u8 =,
@ -1540,6 +1624,18 @@ state_packets!(
field entity_id: Option<i32> = when(|p: &CombatEvent| p.event.0 == 1 || p.event.0 == 2),
field message: Option<format::Component> = when(|p: &CombatEvent| p.event.0 == 2),
}
packet CombatEventEnd {
field duration: VarInt =,
field entity_id: i32 =,
}
packet CombatEventEnter {
field empty: Vec<u8> =, // empty packet, but a field is syntactically required here
}
packet CombatEventDeath {
field player_id: VarInt =,
field entity_id: i32 =,
field message: String =,
}
/// PlayerInfo is sent by the server for every player connected to the server
/// to provide skin and username information as well as ping and gamemode info.
packet PlayerInfo {
@ -1562,6 +1658,16 @@ state_packets!(
/// TeleportPlayer is sent to change the player's position. The client is expected
/// to reply to the server with the same positions as contained in this packet
/// otherwise will reject future packets.
packet TeleportPlayer_WithDismount {
field x: f64 =,
field y: f64 =,
field z: f64 =,
field yaw: f32 =,
field pitch: f32 =,
field flags: u8 =,
field teleport_id: VarInt =,
field dismount: bool =,
}
packet TeleportPlayer_WithConfirm {
field x: f64 =,
field y: f64 =,
@ -1646,6 +1752,13 @@ state_packets!(
/// ResourcePackSend causes the client to check its cache for the requested
/// resource packet and download it if its missing. Once the resource pack
/// is obtained the client will use it.
packet ResourcePackSend_Prompt {
field url: String =,
field hash: String =,
field forced: bool =,
field has_prompt_message: bool =,
field prompt_message: String = when(|p: &ResourcePackSend_Prompt| p.has_prompt_message),
}
packet ResourcePackSend {
field url: String =,
field hash: String =,
@ -1706,6 +1819,9 @@ state_packets!(
field has_id: bool =,
field tab_id: String = when(|p: &SelectAdvancementTab| p.has_id),
}
packet ActionBar {
field text: String =,
}
/// WorldBorder configures the world's border.
packet WorldBorder {
field action: VarInt =,
@ -1718,6 +1834,24 @@ state_packets!(
field warning_time: Option<VarInt> = when(|p: &WorldBorder| p.action.0 == 3 || p.action.0 == 4),
field warning_blocks: Option<VarInt> = when(|p: &WorldBorder| p.action.0 == 3 || p.action.0 == 5),
}
packet WorldBorderCenter {
field x: f64 =,
field z: f64 =,
}
packet WorldBorderLerpSize {
field old_diameter: f64 =,
field new_diameter: f64 =,
field speed: VarLong =,
}
packet WorldBorderSize {
field diameter: f64 =,
}
packet WorldBorderWarningDelay {
field warning_time: VarInt =,
}
packet WorldBorderWarningReach {
field warning_blocks: VarInt =,
}
/// Camera causes the client to spectate the entity with the passed id.
/// Use the player's id to de-spectate.
packet Camera {
@ -1887,7 +2021,11 @@ state_packets!(
}
/// SpawnPosition is sent to change the player's current spawn point. Currently
/// only used by the client for the compass.
packet SpawnPosition {
packet SpawnPosition_Angle {
field location: Position =,
field angle: f32 =,
}
packet SpawnPosition_NoAngle {
field location: Position =,
}
packet SpawnPosition_i32 {
@ -1934,6 +2072,14 @@ state_packets!(
field fade_stay: Option<format::Component> = when(|p: &Title_notext_component| p.action.0 == 2),
field fade_out: Option<format::Component> = when(|p: &Title_notext_component| p.action.0 == 2),
}
packet TitleSubtitle {
field subtitle_text: String =,
}
packet TitleTimes {
field fade_in: i32 =,
field stay: i32 =,
field fade_out: i32 =,
}
/// UpdateSign sets or changes the text on a sign.
packet UpdateSign {
field location: Position =,
@ -2037,7 +2183,11 @@ state_packets!(
*/
}
/// EntityProperties updates the properties for an entity.
packet EntityProperties {
packet EntityProperties_VarIntVarInt {
field entity_id: VarInt =,
field properties: LenPrefixed<VarInt, packet::EntityProperty> =,
}
packet EntityProperties_VarInt {
field entity_id: VarInt =,
field properties: LenPrefixed<i32, packet::EntityProperty> =,
}
@ -2067,18 +2217,32 @@ state_packets!(
field item_tags: LenPrefixed<VarInt, packet::Tags> =,
field fluid_tags: LenPrefixed<VarInt, packet::Tags> =,
}
packet TagsWithEntities {
packet Tags_WithEntities {
field block_tags: LenPrefixed<VarInt, packet::Tags> =,
field item_tags: LenPrefixed<VarInt, packet::Tags> =,
field fluid_tags: LenPrefixed<VarInt, packet::Tags> =,
field entity_tags: LenPrefixed<VarInt, packet::Tags> =,
}
packet Tags_Nested {
field tags: LenPrefixed<VarInt, packet::TagsGroup> =,
}
packet AcknowledgePlayerDigging {
field location: Position =,
field block: VarInt =,
field status: VarInt =,
field successful: bool =,
}
packet UpdateLight_Arrays {
field chunk_x: VarInt =,
field chunk_z: VarInt =,
field trust_edges: bool =,
field sky_light_mask: LenPrefixed<VarInt, i64> =,
field block_light_mask: LenPrefixed<VarInt, i64> =,
field empty_sky_light_mask: LenPrefixed<VarInt, i64> =,
field empty_block_light_mask: LenPrefixed<VarInt, i64> =,
field sky_light_arrays: LenPrefixed<VarInt, LenPrefixed<VarInt, u8>> =,
field block_light_arrays: LenPrefixed<VarInt, LenPrefixed<VarInt, u8>> =,
}
packet UpdateLight_WithTrust {
field chunk_x: VarInt =,
field chunk_z: VarInt =,
@ -2086,6 +2250,7 @@ state_packets!(
field sky_light_mask: VarInt =,
field block_light_mask: VarInt =,
field empty_sky_light_mask: VarInt =,
// TODO: this packet changed <=1.16.4, see https://wiki.vg/index.php?title=Protocol&oldid=16681#Update_Light
field light_arrays: Vec<u8> =,
}
packet UpdateLight_NoTrust {
@ -3007,6 +3172,25 @@ impl Serializable for Tags {
}
}
#[derive(Debug, Default)]
pub struct TagsGroup {
pub tag_type: String,
pub tags: LenPrefixed<VarInt, Tags>,
}
impl Serializable for TagsGroup {
fn read_from<R: io::Read>(buf: &mut R) -> Result<Self, Error> {
Ok(TagsGroup {
tag_type: Serializable::read_from(buf)?,
tags: Serializable::read_from(buf)?,
})
}
fn write_to<W: io::Write>(&self, _: &mut W) -> Result<(), Error> {
unimplemented!()
}
}
#[derive(Debug, Default)]
pub struct Trade {
pub input_item_1: Option<nbt::NamedTag>,
@ -3299,3 +3483,23 @@ impl Serializable for CommandNode {
unimplemented!()
}
}
#[derive(Debug, Clone, Default)]
pub struct NumberedSlot {
pub slot_number: i16,
pub slot_data: Option<item::Stack>,
}
impl Serializable for NumberedSlot {
fn read_from<R: io::Read>(buf: &mut R) -> Result<Self, Error> {
Ok(NumberedSlot {
slot_number: Serializable::read_from(buf)?,
slot_data: Serializable::read_from(buf)?,
})
}
fn write_to<W: io::Write>(&self, buf: &mut W) -> Result<(), Error> {
self.slot_number.write_to(buf)?;
self.slot_data.write_to(buf)
}
}

3
protocol/src/protocol/versions.rs

@ -15,6 +15,7 @@ mod v1_14_4;
mod v1_15;
mod v1_16_1;
mod v1_16_4;
mod v1_17_1;
mod v1_7_10;
mod v1_8_9;
mod v1_9;
@ -26,6 +27,7 @@ mod v1_9_2;
pub fn protocol_name_to_protocol_version(s: String) -> i32 {
match s.as_ref() {
"" => SUPPORTED_PROTOCOLS[0],
"1.17.1" => 756,
"1.16.5" => 754,
"1.16.4" => 754,
"1.16.3" => 753,
@ -69,6 +71,7 @@ pub fn translate_internal_packet_id_for_version(
to_internal: bool,
) -> i32 {
match version {
756 => v1_17_1::translate_internal_packet_id(state, dir, id, to_internal),
754 | 753 | 751 => v1_16_4::translate_internal_packet_id(state, dir, id, to_internal),
736 => v1_16_1::translate_internal_packet_id(state, dir, id, to_internal),
735 => v1_16_1::translate_internal_packet_id(state, dir, id, to_internal),

8
protocol/src/protocol/versions/v15w39c.rs

@ -57,14 +57,14 @@ protocol_packet_ids!(
0x11 => ConfirmTransaction
0x12 => WindowClose
0x13 => WindowOpen
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
0x18 => PluginMessageClientbound
0x19 => Disconnect
0x1a => EntityAction
0x1b => Explosion
0x1b => Explosion_i32
0x1c => ChunkUnload
0x1d => SetCompression
0x1e => ChangeGameState
@ -103,14 +103,14 @@ protocol_packet_ids!(
0x3f => ScoreboardObjective
0x40 => Teams_u8
0x41 => UpdateScore
0x42 => SpawnPosition
0x42 => SpawnPosition_NoAngle
0x43 => TimeUpdate
0x44 => Title_notext_component
0x45 => UpdateSign
0x46 => PlayerListHeaderFooter
0x47 => CollectItem_nocount
0x48 => EntityTeleport_i32
0x49 => EntityProperties
0x49 => EntityProperties_VarInt
0x4a => EntityEffect
}
}

14
protocol/src/protocol/versions/v18w50a.rs

@ -19,7 +19,7 @@ protocol_packet_ids!(
0x08 => ClickWindow
0x09 => CloseWindow
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0b => EditBook_Item
0x0c => QueryEntityNBT
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
@ -74,7 +74,7 @@ protocol_packet_ids!(
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowOpen
0x15 => WindowItems
0x15 => WindowItems_i16
0x16 => WindowProperty
0x17 => WindowSetSlot
0x18 => SetCooldown
@ -83,13 +83,13 @@ protocol_packet_ids!(
0x1b => Disconnect
0x1c => EntityAction
0x1d => NBTQueryResponse
0x1e => Explosion
0x1e => Explosion_i32
0x1f => ChunkUnload
0x20 => ChangeGameState
0x21 => KeepAliveClientbound_i64
0x22 => ChunkData_HeightMap
0x23 => Effect
0x24 => Particle_VarIntArray
0x24 => Particle_f32
0x25 => JoinGame_i32
0x26 => Maps_NoLocked
0x27 => Entity
@ -127,7 +127,7 @@ protocol_packet_ids!(
0x47 => SetPassengers
0x48 => Teams_u8
0x49 => UpdateScore
0x4a => SpawnPosition
0x4a => SpawnPosition_NoAngle
0x4b => TimeUpdate
0x4d => StopSound
0x4e => SoundEffect
@ -136,10 +136,10 @@ protocol_packet_ids!(
0x51 => CollectItem
0x52 => EntityTeleport_f64
0x53 => Advancements
0x54 => EntityProperties
0x54 => EntityProperties_VarInt
0x55 => EntityEffect
0x56 => DeclareRecipes
0x57 => TagsWithEntities
0x57 => Tags_WithEntities
0x58 => UpdateLight_NoTrust
}
}

14
protocol/src/protocol/versions/v19w02a.rs

@ -19,7 +19,7 @@ protocol_packet_ids!(
0x08 => ClickWindow
0x09 => CloseWindow
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0b => EditBook_Item
0x0c => QueryEntityNBT
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
@ -74,7 +74,7 @@ protocol_packet_ids!(
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowOpenHorse
0x15 => WindowItems
0x15 => WindowItems_i16
0x16 => WindowProperty
0x17 => WindowSetSlot
0x18 => SetCooldown
@ -83,13 +83,13 @@ protocol_packet_ids!(
0x1b => Disconnect
0x1c => EntityAction
0x1d => NBTQueryResponse
0x1e => Explosion
0x1e => Explosion_i32
0x1f => ChunkUnload
0x20 => ChangeGameState
0x21 => KeepAliveClientbound_i64
0x22 => ChunkData_HeightMap
0x23 => Effect
0x24 => Particle_Data13
0x24 => Particle_f32
0x25 => JoinGame_i32
0x26 => Maps
0x27 => Entity
@ -127,7 +127,7 @@ protocol_packet_ids!(
0x47 => SetPassengers
0x48 => Teams_u8
0x49 => UpdateScore
0x4a => SpawnPosition
0x4a => SpawnPosition_NoAngle
0x4b => TimeUpdate
0x4d => StopSound
0x4e => SoundEffect
@ -136,10 +136,10 @@ protocol_packet_ids!(
0x51 => CollectItem
0x52 => EntityTeleport_f64
0x53 => Advancements
0x54 => EntityProperties
0x54 => EntityProperties_VarInt
0x55 => EntityEffect
0x56 => DeclareRecipes
0x57 => TagsWithEntities
0x57 => Tags_WithEntities
0x58 => UpdateLight_NoTrust
0x59 => WindowOpen_VarInt
0x5a => TradeList_WithoutRestock // TODO: without 1.14 added fields

8
protocol/src/protocol/versions/v1_10_2.rs

@ -60,7 +60,7 @@ protocol_packet_ids!(
0x11 => ConfirmTransaction
0x12 => WindowClose
0x13 => WindowOpen
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -68,7 +68,7 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => KeepAliveClientbound_VarInt
@ -107,14 +107,14 @@ protocol_packet_ids!(
0x40 => SetPassengers
0x41 => Teams_u8
0x42 => UpdateScore
0x43 => SpawnPosition
0x43 => SpawnPosition_NoAngle
0x44 => TimeUpdate
0x45 => Title_notext
0x46 => SoundEffect
0x47 => PlayerListHeaderFooter
0x48 => CollectItem_nocount
0x49 => EntityTeleport_f64
0x4a => EntityProperties
0x4a => EntityProperties_VarInt
0x4b => EntityEffect
}
}

8
protocol/src/protocol/versions/v1_11_2.rs

@ -60,7 +60,7 @@ protocol_packet_ids!(
0x11 => ConfirmTransaction
0x12 => WindowClose
0x13 => WindowOpen
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -68,7 +68,7 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => KeepAliveClientbound_VarInt
@ -107,14 +107,14 @@ protocol_packet_ids!(
0x40 => SetPassengers
0x41 => Teams_u8
0x42 => UpdateScore
0x43 => SpawnPosition
0x43 => SpawnPosition_NoAngle
0x44 => TimeUpdate
0x45 => Title
0x46 => SoundEffect
0x47 => PlayerListHeaderFooter
0x48 => CollectItem
0x49 => EntityTeleport_f64
0x4a => EntityProperties
0x4a => EntityProperties_VarInt
0x4b => EntityEffect
}
}

8
protocol/src/protocol/versions/v1_12_2.rs

@ -63,7 +63,7 @@ protocol_packet_ids!(
0x11 => ConfirmTransaction
0x12 => WindowClose
0x13 => WindowOpen
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -71,7 +71,7 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => KeepAliveClientbound_i64
@ -113,7 +113,7 @@ protocol_packet_ids!(
0x43 => SetPassengers
0x44 => Teams_u8
0x45 => UpdateScore
0x46 => SpawnPosition
0x46 => SpawnPosition_NoAngle
0x47 => TimeUpdate
0x48 => Title
0x49 => SoundEffect
@ -121,7 +121,7 @@ protocol_packet_ids!(
0x4b => CollectItem
0x4c => EntityTeleport_f64
0x4d => Advancements
0x4e => EntityProperties
0x4e => EntityProperties_VarInt
0x4f => EntityEffect
}
}

12
protocol/src/protocol/versions/v1_13_2.rs

@ -19,7 +19,7 @@ protocol_packet_ids!(
0x08 => ClickWindow
0x09 => CloseWindow
0x0a => PluginMessageServerbound
0x0b => EditBook
0x0b => EditBook_Item
0x0c => QueryEntityNBT
0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64
@ -74,7 +74,7 @@ protocol_packet_ids!(
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowOpen
0x15 => WindowItems
0x15 => WindowItems_i16
0x16 => WindowProperty
0x17 => WindowSetSlot
0x18 => SetCooldown
@ -83,13 +83,13 @@ protocol_packet_ids!(
0x1b => Disconnect
0x1c => EntityAction
0x1d => NBTQueryResponse
0x1e => Explosion
0x1e => Explosion_i32
0x1f => ChunkUnload
0x20 => ChangeGameState
0x21 => KeepAliveClientbound_i64
0x22 => ChunkData
0x23 => Effect
0x24 => Particle_Data13
0x24 => Particle_f32
0x25 => JoinGame_i32
0x26 => Maps_NoLocked
0x27 => Entity
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x46 => SetPassengers
0x47 => Teams_VarInt
0x48 => UpdateScore
0x49 => SpawnPosition
0x49 => SpawnPosition_NoAngle
0x4a => TimeUpdate
0x4c => StopSound
0x4d => SoundEffect
@ -134,7 +134,7 @@ protocol_packet_ids!(
0x4f => CollectItem
0x50 => EntityTeleport_f64
0x51 => Advancements
0x52 => EntityProperties
0x52 => EntityProperties_VarInt
0x53 => EntityEffect
0x54 => DeclareRecipes
0x55 => Tags

14
protocol/src/protocol/versions/v1_14.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64
@ -76,7 +76,7 @@ protocol_packet_ids!(
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -84,14 +84,14 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_HeightMap
0x22 => Effect
0x23 => Particle_Data
0x23 => Particle_f32
0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance
0x26 => Maps
@ -133,7 +133,7 @@ protocol_packet_ids!(
0x4a => SetPassengers
0x4b => Teams_VarInt
0x4c => UpdateScore
0x4d => SpawnPosition
0x4d => SpawnPosition_NoAngle
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
@ -144,10 +144,10 @@ protocol_packet_ids!(
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x58 => EntityProperties_VarInt
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
0x5b => Tags_WithEntities
}
}
login Login {

14
protocol/src/protocol/versions/v1_14_1.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64
@ -76,7 +76,7 @@ protocol_packet_ids!(
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -84,14 +84,14 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_HeightMap
0x22 => Effect
0x23 => Particle_Data
0x23 => Particle_f32
0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance
0x26 => Maps
@ -133,7 +133,7 @@ protocol_packet_ids!(
0x4a => SetPassengers
0x4b => Teams_VarInt
0x4c => UpdateScore
0x4d => SpawnPosition
0x4d => SpawnPosition_NoAngle
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
@ -144,10 +144,10 @@ protocol_packet_ids!(
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x58 => EntityProperties_VarInt
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
0x5b => Tags_WithEntities
}
}
login Login {

14
protocol/src/protocol/versions/v1_14_2.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64
@ -76,7 +76,7 @@ protocol_packet_ids!(
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -84,14 +84,14 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_HeightMap
0x22 => Effect
0x23 => Particle_Data
0x23 => Particle_f32
0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance
0x26 => Maps
@ -133,7 +133,7 @@ protocol_packet_ids!(
0x4a => SetPassengers
0x4b => Teams_VarInt
0x4c => UpdateScore
0x4d => SpawnPosition
0x4d => SpawnPosition_NoAngle
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
@ -144,10 +144,10 @@ protocol_packet_ids!(
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x58 => EntityProperties_VarInt
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
0x5b => Tags_WithEntities
}
}
login Login {

14
protocol/src/protocol/versions/v1_14_3.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64
@ -76,7 +76,7 @@ protocol_packet_ids!(
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -84,14 +84,14 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_HeightMap
0x22 => Effect
0x23 => Particle_Data
0x23 => Particle_f32
0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance
0x26 => Maps
@ -133,7 +133,7 @@ protocol_packet_ids!(
0x4a => SetPassengers
0x4b => Teams_VarInt
0x4c => UpdateScore
0x4d => SpawnPosition
0x4d => SpawnPosition_NoAngle
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
@ -144,10 +144,10 @@ protocol_packet_ids!(
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x58 => EntityProperties_VarInt
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
0x5b => Tags_WithEntities
}
}
login Login {

14
protocol/src/protocol/versions/v1_14_4.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT
0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64
@ -76,7 +76,7 @@ protocol_packet_ids!(
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x14 => WindowItems_i16
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
@ -84,14 +84,14 @@ protocol_packet_ids!(
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1c => Explosion_i32
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_HeightMap
0x22 => Effect
0x23 => Particle_Data
0x23 => Particle_f32
0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance
0x26 => Maps
@ -133,7 +133,7 @@ protocol_packet_ids!(
0x4a => SetPassengers
0x4b => Teams_VarInt
0x4c => UpdateScore
0x4d => SpawnPosition
0x4d => SpawnPosition_NoAngle
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
@ -144,10 +144,10 @@ protocol_packet_ids!(
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x58 => EntityProperties_VarInt
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
0x5b => Tags_WithEntities
0x5c => AcknowledgePlayerDigging
}
}

12
protocol/src/protocol/versions/v1_15.rs

@ -20,7 +20,7 @@ protocol_packet_ids!(
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0c => EditBook_Item
0x0d => QueryEntityNBT