aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-06-12 14:38:40 -0500
committermat <git@matdoes.dev>2023-06-12 14:38:40 -0500
commit5f8e5be4dcbcb425d87ae2a1dee5ba5ef4484c10 (patch)
treedf134f8abfd0723a19998ac07e8be806619f41bc /azalea-protocol
parentbc7e0ab53739f59f68f860ba75973908ffc5b560 (diff)
parent49f951688e4ab117ee2719a9db573bd731c4748a (diff)
downloadazalea-drasl-5f8e5be4dcbcb425d87ae2a1dee5ba5ef4484c10.tar.xz
Merge branch '1.20'
Diffstat (limited to 'azalea-protocol')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs10
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_light_update_packet.rs1
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_login_packet.rs2
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs1
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs1
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_respawn_packet.rs2
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs4
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs9
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_sign_update_packet.rs1
-rwxr-xr-xazalea-protocol/src/packets/mod.rs2
12 files changed, 20 insertions, 19 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs b/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs
index 30813013..2fc00f83 100755
--- a/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs
@@ -1,4 +1,5 @@
use azalea_buf::McBuf;
+use azalea_nbt::Nbt;
use azalea_protocol_macros::ClientboundGamePacket;
use super::clientbound_light_update_packet::ClientboundLightUpdatePacketData;
@@ -13,8 +14,8 @@ pub struct ClientboundLevelChunkWithLightPacket {
#[derive(Clone, Debug, McBuf)]
pub struct ClientboundLevelChunkPacketData {
- pub heightmaps: azalea_nbt::Nbt,
- // we can't parse the data in azalea-protocol because it dependso on context from other packets
+ pub heightmaps: Nbt,
+ // we can't parse the data in azalea-protocol because it depends on context from other packets
pub data: Vec<u8>,
pub block_entities: Vec<BlockEntity>,
}
@@ -23,7 +24,6 @@ pub struct ClientboundLevelChunkPacketData {
pub struct BlockEntity {
pub packed_xz: u8,
pub y: u16,
- #[var]
- pub type_: i32,
- pub data: azalea_nbt::Nbt,
+ pub kind: azalea_registry::BlockEntityKind,
+ pub data: Nbt,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs
index 5a0478ca..3e5ca1b9 100755
--- a/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs
@@ -13,7 +13,6 @@ pub struct ClientboundLightUpdatePacket {
#[derive(Clone, Debug, McBuf)]
pub struct ClientboundLightUpdatePacketData {
- pub trust_edges: bool,
pub sky_y_mask: BitSet,
pub block_y_mask: BitSet,
pub empty_sky_y_mask: BitSet,
diff --git a/azalea-protocol/src/packets/game/clientbound_login_packet.rs b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
index 346c24fb..b57fe66f 100755
--- a/azalea-protocol/src/packets/game/clientbound_login_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
@@ -29,6 +29,8 @@ pub struct ClientboundLoginPacket {
pub is_debug: bool,
pub is_flat: bool,
pub last_death_location: Option<GlobalPos>,
+ #[var]
+ pub portal_cooldown: u32,
}
pub mod registry {
diff --git a/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs b/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs
index b317765e..c774b647 100755
--- a/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs
@@ -5,4 +5,5 @@ use azalea_protocol_macros::ClientboundGamePacket;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundOpenSignEditorPacket {
pub pos: BlockPos,
+ pub is_front_text: bool,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs
index 67d29e93..dafb839f 100755
--- a/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs
@@ -1,10 +1,9 @@
use azalea_buf::McBuf;
use azalea_protocol_macros::ClientboundGamePacket;
-/// Unused in vanilla.
+/// Unused by the client in vanilla.
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundPlayerCombatEndPacket {
#[var]
pub duration: u32,
- pub killer_id: u32,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs
index eae96f65..c309342f 100755
--- a/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs
@@ -7,6 +7,5 @@ use azalea_protocol_macros::ClientboundGamePacket;
pub struct ClientboundPlayerCombatKillPacket {
#[var]
pub player_id: u32,
- pub killer_id: u32,
pub message: FormattedText,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs b/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs
index 03cc2917..3518aa08 100755
--- a/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs
@@ -13,4 +13,6 @@ pub struct ClientboundRespawnPacket {
pub is_flat: bool,
pub data_to_keep: u8,
pub last_death_location: Option<GlobalPos>,
+ #[var]
+ pub portal_cooldown: u32,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs
index 1ea9f676..aeec52fc 100755
--- a/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs
@@ -1,15 +1,15 @@
+use std::io::{Cursor, Write};
+
use azalea_block::BlockState;
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
};
use azalea_core::{ChunkSectionBlockPos, ChunkSectionPos};
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundSectionBlocksUpdatePacket {
pub section_pos: ChunkSectionPos,
- pub suppress_light_updates: bool,
pub states: Vec<BlockStateWithPosition>,
}
diff --git a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
index 76f1412c..a561fa9c 100755
--- a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
@@ -16,10 +16,11 @@ pub struct ClientboundUpdateAdvancementsPacket {
#[derive(Clone, Debug, McBuf)]
pub struct Advancement {
- parent_id: Option<ResourceLocation>,
- display: Option<DisplayInfo>,
- criteria: HashMap<ResourceLocation, Criterion>,
- requirements: Vec<Vec<String>>,
+ pub parent_id: Option<ResourceLocation>,
+ pub display: Option<DisplayInfo>,
+ pub criteria: HashMap<ResourceLocation, Criterion>,
+ pub requirements: Vec<Vec<String>>,
+ pub sends_telemetry_event: bool,
}
#[derive(Clone, Debug)]
diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
index 94fe31c1..8c24bdbe 100755
--- a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
@@ -152,7 +152,6 @@ pub enum RecipeData {
Smoking(CookingRecipe),
CampfireCooking(CookingRecipe),
Stonecutting(StoneCutterRecipe),
- Smithing(SmithingRecipe),
SmithingTransform(SmithingTransformRecipe),
SmithingTrim(SmithingTrimRecipe),
CraftingDecoratedPot(SimpleRecipe),
@@ -207,7 +206,6 @@ impl McBufWritable for Recipe {
RecipeData::Smoking(_) => RecipeSerializer::Smoking,
RecipeData::CampfireCooking(_) => RecipeSerializer::CampfireCooking,
RecipeData::Stonecutting(_) => RecipeSerializer::Stonecutting,
- RecipeData::Smithing(_) => RecipeSerializer::Smithing,
RecipeData::SmithingTransform(_) => RecipeSerializer::SmithingTransform,
RecipeData::SmithingTrim(_) => RecipeSerializer::SmithingTrim,
RecipeData::CraftingDecoratedPot(_) => RecipeSerializer::CraftingDecoratedPot,
@@ -286,7 +284,6 @@ impl McBufReadable for Recipe {
RecipeSerializer::Stonecutting => {
RecipeData::Stonecutting(StoneCutterRecipe::read_from(buf)?)
}
- RecipeSerializer::Smithing => RecipeData::Smithing(SmithingRecipe::read_from(buf)?),
RecipeSerializer::SmithingTransform => {
RecipeData::SmithingTransform(SmithingTransformRecipe::read_from(buf)?)
}
diff --git a/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs b/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs
index afebfa72..82e4c2b8 100755
--- a/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs
@@ -5,5 +5,6 @@ use azalea_protocol_macros::ServerboundGamePacket;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundSignUpdatePacket {
pub pos: BlockPos,
+ pub is_front_text: bool,
pub lines: [String; 4],
}
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs
index 2b8d917d..a9e2948c 100755
--- a/azalea-protocol/src/packets/mod.rs
+++ b/azalea-protocol/src/packets/mod.rs
@@ -10,7 +10,7 @@ use std::io::{Cursor, Write};
// TODO: rename the packet files to just like clientbound_add_entity instead of
// clientbound_add_entity_packet
-pub const PROTOCOL_VERSION: u32 = 762;
+pub const PROTOCOL_VERSION: u32 = 763;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConnectionProtocol {