aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-23 23:45:23 -0500
committermat <github@matdoes.dev>2022-06-23 23:45:23 -0500
commitce834aeca5d732a547b66554590232321e3d1829 (patch)
treef7dbb7b9b1fa00a50fb98f5f020ba6ca4f2a9c6a
parent2cdbdcaa27c812e569c7c1a13d83182446e7f18b (diff)
downloadazalea-drasl-ce834aeca5d732a547b66554590232321e3d1829.tar.xz
Fixes
-rw-r--r--azalea-client/src/movement.rs2
-rw-r--r--azalea-crypto/src/lib.rs2
-rwxr-xr-xazalea-protocol/src/packets/game/mod.rs2
-rw-r--r--codegen/lib/code/packet.py3
4 files changed, 4 insertions, 5 deletions
diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs
index 9f5cd27c..c9cd62e9 100644
--- a/azalea-client/src/movement.rs
+++ b/azalea-client/src/movement.rs
@@ -1,5 +1,5 @@
-use azalea_core::EntityPos;
use crate::Client;
+use azalea_core::EntityPos;
use azalea_protocol::packets::game::serverbound_move_player_packet_pos_rot::ServerboundMovePlayerPacketPosRot;
impl Client {
diff --git a/azalea-crypto/src/lib.rs b/azalea-crypto/src/lib.rs
index 85705883..a5e797e8 100644
--- a/azalea-crypto/src/lib.rs
+++ b/azalea-crypto/src/lib.rs
@@ -79,8 +79,6 @@ pub fn decrypt_packet(cipher: &mut Aes128CfbDec, packet: &mut [u8]) {
cipher.decrypt_blocks_inout_mut(chunks);
}
-
-
#[cfg(test)]
mod tests {
use super::*;
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs
index 80cada9b..d3d6650c 100755
--- a/azalea-protocol/src/packets/game/mod.rs
+++ b/azalea-protocol/src/packets/game/mod.rs
@@ -105,13 +105,13 @@ declare_state_packets!(
0x3c: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
0x3d: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket,
0x3f: clientbound_server_data_packet::ClientboundServerDataPacket,
- 0x44: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
0x47: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
0x48: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket,
0x49: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket,
0x4a: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket,
0x4b: clientbound_set_display_chat_preview_packet::ClientboundSetDisplayChatPreviewPacket,
0x4d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket,
+ 0x4e: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
0x4f: clientbound_entity_velocity_packet::ClientboundEntityVelocityPacket,
0x50: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket,
0x51: clientbound_set_experience_packet::ClientboundSetExperiencePacket,
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py
index c282bdb4..b4ca8be7 100644
--- a/codegen/lib/code/packet.py
+++ b/codegen/lib/code/packet.py
@@ -29,7 +29,8 @@ def generate_packet(burger_packets, mappings: Mappings, target_packet_id, target
uses = set()
generated_packet_code.append(
f'#[derive(Clone, Debug, McBuf, {to_camel_case(state)}Packet)]')
- uses.add(f'packet_macros::{{{to_camel_case(state)}Packet, McBuf}}')
+ uses.add(f'packet_macros::{to_camel_case(state)}Packet')
+ uses.add(f'packet_buf::McBuf')
obfuscated_class_name = packet['class'].split('.')[0]
class_name = mappings.get_class(