diff options
Diffstat (limited to 'azalea-protocol/src')
4 files changed, 8 insertions, 5 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs index f74a8746..fcbd8fa5 100644 --- a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs @@ -1,7 +1,7 @@ use azalea_buf::McBuf; use azalea_core::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -use azalea_world::entity::EntityData; +use azalea_world::entity::{EntityData, EntityMetadata}; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -33,6 +33,8 @@ impl From<&ClientboundAddEntityPacket> for EntityData { y: p.y, z: p.z, }, + // default metadata for the entity type + EntityMetadata::from(p.entity_type), ) } } diff --git a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs index 4a763c64..03585f06 100644 --- a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs @@ -1,7 +1,7 @@ use azalea_buf::McBuf; use azalea_core::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -use azalea_world::entity::EntityData; +use azalea_world::entity::{metadata, EntityData, EntityMetadata}; use uuid::Uuid; /// This packet is sent by the server when a player comes into visible range, not when a player joins. @@ -26,6 +26,7 @@ impl From<&ClientboundAddPlayerPacket> for EntityData { y: p.y, z: p.z, }, + EntityMetadata::Player(metadata::Player::default()), ) } } diff --git a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs index 705a7540..eaa34669 100644 --- a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs @@ -32,7 +32,7 @@ impl McBufReadable for ClientboundLevelParticlesPacket { let max_speed = f32::read_from(buf)?; let count = u32::read_from(buf)?; - let data = ParticleData::read_from_particle_id(buf, particle_id)?; + let data = ParticleData::read_from_id(buf, particle_id)?; Ok(Self { particle_id, diff --git a/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs index 05c89296..d133eeea 100644 --- a/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use azalea_world::entity::EntityMetadata; +use azalea_world::entity::EntityMetadataItems; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundSetEntityDataPacket { #[var] pub id: u32, - pub packed_items: EntityMetadata, + pub packed_items: EntityMetadataItems, } |
