aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-02-16 17:10:04 +0000
committermat <git@matdoes.dev>2025-02-16 17:10:04 +0000
commit228489dded720cea566dd0a4638b39cba2aff5ec (patch)
treeae4631e3ed42cd13b02bdcd32e81761ca79f4d0c /azalea-protocol/src
parent4fb6b077464e14f816e4c4fe54ff648e8c3d0ede (diff)
downloadazalea-drasl-228489dded720cea566dd0a4638b39cba2aff5ec.tar.xz
use MinecraftEntityId type instead of u32 in az-protocol
Diffstat (limited to 'azalea-protocol/src')
-rwxr-xr-xazalea-protocol/src/packets/game/c_add_entity.rs5
-rwxr-xr-xazalea-protocol/src/packets/game/c_add_experience_orb.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_animate.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_block_destruction.rs3
-rw-r--r--azalea-protocol/src/packets/game/c_damage_event.rs5
-rwxr-xr-xazalea-protocol/src/packets/game/c_entity_event.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_entity_position_sync.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_horse_screen_open.rs3
-rw-r--r--azalea-protocol/src/packets/game/c_hurt_animation.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_login.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_move_entity_pos.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_move_entity_pos_rot.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_move_entity_rot.rs3
-rw-r--r--azalea-protocol/src/packets/game/c_move_minecart_along_track.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_player_combat_kill.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_player_position.rs1
-rw-r--r--azalea-protocol/src/packets/game/c_projectile_power.rs4
-rwxr-xr-xazalea-protocol/src/packets/game/c_remove_entities.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_remove_mob_effect.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_rotate_head.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_camera.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_entity_data.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_entity_link.rs5
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_entity_motion.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_equipment.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_sound_entity.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_take_item_entity.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_teleport_entity.rs4
-rwxr-xr-xazalea-protocol/src/packets/game/c_update_attributes.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/c_update_mob_effect.rs3
-rw-r--r--azalea-protocol/src/packets/game/s_entity_tag_query.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/s_interact.rs3
-rw-r--r--azalea-protocol/src/packets/game/s_pick_item_from_entity.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/s_player_command.rs3
34 files changed, 71 insertions, 37 deletions
diff --git a/azalea-protocol/src/packets/game/c_add_entity.rs b/azalea-protocol/src/packets/game/c_add_entity.rs
index cf0adeb7..67615fb9 100755
--- a/azalea-protocol/src/packets/game/c_add_entity.rs
+++ b/azalea-protocol/src/packets/game/c_add_entity.rs
@@ -2,13 +2,14 @@ use azalea_buf::AzBuf;
use azalea_core::{position::Vec3, resource_location::ResourceLocation};
use azalea_entity::{metadata::apply_default_metadata, EntityBundle};
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
use uuid::Uuid;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundAddEntity {
- /// The id of the entity.
+ /// The numeric ID of the entity being added to the world.
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub uuid: Uuid,
pub entity_type: azalea_registry::EntityKind,
pub position: Vec3,
diff --git a/azalea-protocol/src/packets/game/c_add_experience_orb.rs b/azalea-protocol/src/packets/game/c_add_experience_orb.rs
index 195ccc5a..295e1010 100755
--- a/azalea-protocol/src/packets/game/c_add_experience_orb.rs
+++ b/azalea-protocol/src/packets/game/c_add_experience_orb.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_core::position::Vec3;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundAddExperienceOrb {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub pos: Vec3,
pub value: u16,
}
diff --git a/azalea-protocol/src/packets/game/c_animate.rs b/azalea-protocol/src/packets/game/c_animate.rs
index bda0b152..eaaa151d 100755
--- a/azalea-protocol/src/packets/game/c_animate.rs
+++ b/azalea-protocol/src/packets/game/c_animate.rs
@@ -1,10 +1,11 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundAnimate {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub action: AnimationAction,
}
diff --git a/azalea-protocol/src/packets/game/c_block_destruction.rs b/azalea-protocol/src/packets/game/c_block_destruction.rs
index 50d8085b..4a6e5f69 100755
--- a/azalea-protocol/src/packets/game/c_block_destruction.rs
+++ b/azalea-protocol/src/packets/game/c_block_destruction.rs
@@ -1,12 +1,13 @@
use azalea_buf::AzBuf;
use azalea_core::position::BlockPos;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundBlockDestruction {
/// The ID of the entity breaking the block.
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub pos: BlockPos,
/// 0–9 to set it, any other value to remove it.
pub progress: u8,
diff --git a/azalea-protocol/src/packets/game/c_damage_event.rs b/azalea-protocol/src/packets/game/c_damage_event.rs
index a736f39a..d4393685 100644
--- a/azalea-protocol/src/packets/game/c_damage_event.rs
+++ b/azalea-protocol/src/packets/game/c_damage_event.rs
@@ -1,13 +1,14 @@
use std::io::{Cursor, Write};
-use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite};
+use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar};
use azalea_core::position::Vec3;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundDamageEvent {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
#[var]
pub source_type_id: u32,
pub source_cause_id: OptionalEntityId,
diff --git a/azalea-protocol/src/packets/game/c_entity_event.rs b/azalea-protocol/src/packets/game/c_entity_event.rs
index 13efbabd..6eb08adc 100755
--- a/azalea-protocol/src/packets/game/c_entity_event.rs
+++ b/azalea-protocol/src/packets/game/c_entity_event.rs
@@ -1,8 +1,9 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundEntityEvent {
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub event_id: u8,
}
diff --git a/azalea-protocol/src/packets/game/c_entity_position_sync.rs b/azalea-protocol/src/packets/game/c_entity_position_sync.rs
index 0e8bea01..e3ecc3f0 100755
--- a/azalea-protocol/src/packets/game/c_entity_position_sync.rs
+++ b/azalea-protocol/src/packets/game/c_entity_position_sync.rs
@@ -1,12 +1,13 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
use crate::common::movements::PositionMoveRotation;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundEntityPositionSync {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub values: PositionMoveRotation,
pub on_ground: bool,
}
diff --git a/azalea-protocol/src/packets/game/c_horse_screen_open.rs b/azalea-protocol/src/packets/game/c_horse_screen_open.rs
index 10a89725..53730d24 100755
--- a/azalea-protocol/src/packets/game/c_horse_screen_open.rs
+++ b/azalea-protocol/src/packets/game/c_horse_screen_open.rs
@@ -1,5 +1,6 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundHorseScreenOpen {
@@ -7,5 +8,5 @@ pub struct ClientboundHorseScreenOpen {
pub container_id: i32,
#[var]
pub inventory_columns: u32,
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
}
diff --git a/azalea-protocol/src/packets/game/c_hurt_animation.rs b/azalea-protocol/src/packets/game/c_hurt_animation.rs
index 49a32989..df019bd5 100644
--- a/azalea-protocol/src/packets/game/c_hurt_animation.rs
+++ b/azalea-protocol/src/packets/game/c_hurt_animation.rs
@@ -1,9 +1,10 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundHurtAnimation {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub yaw: f32,
}
diff --git a/azalea-protocol/src/packets/game/c_login.rs b/azalea-protocol/src/packets/game/c_login.rs
index c0616c55..63503697 100755
--- a/azalea-protocol/src/packets/game/c_login.rs
+++ b/azalea-protocol/src/packets/game/c_login.rs
@@ -1,6 +1,7 @@
use azalea_buf::AzBuf;
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
use crate::packets::common::CommonPlayerSpawnInfo;
@@ -10,7 +11,7 @@ use crate::packets::common::CommonPlayerSpawnInfo;
/// world, and the registry.
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundLogin {
- pub player_id: u32,
+ pub player_id: MinecraftEntityId,
pub hardcore: bool,
pub levels: Vec<ResourceLocation>,
#[var]
diff --git a/azalea-protocol/src/packets/game/c_move_entity_pos.rs b/azalea-protocol/src/packets/game/c_move_entity_pos.rs
index b153bb3c..790a1580 100755
--- a/azalea-protocol/src/packets/game/c_move_entity_pos.rs
+++ b/azalea-protocol/src/packets/game/c_move_entity_pos.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_core::delta::PositionDelta8;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundMoveEntityPos {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub delta: PositionDelta8,
pub on_ground: bool,
}
diff --git a/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs
index 7b22e290..2d76aa14 100755
--- a/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs
+++ b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs
@@ -1,12 +1,13 @@
use azalea_buf::AzBuf;
use azalea_core::delta::PositionDelta8;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
/// This packet is sent by the server when an entity moves less then 8 blocks.
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundMoveEntityPosRot {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub delta: PositionDelta8,
pub y_rot: i8,
pub x_rot: i8,
diff --git a/azalea-protocol/src/packets/game/c_move_entity_rot.rs b/azalea-protocol/src/packets/game/c_move_entity_rot.rs
index a8362748..e33a12e9 100755
--- a/azalea-protocol/src/packets/game/c_move_entity_rot.rs
+++ b/azalea-protocol/src/packets/game/c_move_entity_rot.rs
@@ -1,10 +1,11 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundMoveEntityRot {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub y_rot: i8,
pub x_rot: i8,
pub on_ground: bool,
diff --git a/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs b/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs
index 0a205ddd..b6313b6a 100644
--- a/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs
+++ b/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_core::position::Vec3;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundMoveMinecartAlongTrack {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub lerp_steps: Vec<MinecartStep>,
}
diff --git a/azalea-protocol/src/packets/game/c_player_combat_kill.rs b/azalea-protocol/src/packets/game/c_player_combat_kill.rs
index fb7285b5..2d6fc3e7 100755
--- a/azalea-protocol/src/packets/game/c_player_combat_kill.rs
+++ b/azalea-protocol/src/packets/game/c_player_combat_kill.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_chat::FormattedText;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
/// Used to send a respawn screen.
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundPlayerCombatKill {
#[var]
- pub player_id: u32,
+ pub player_id: MinecraftEntityId,
pub message: FormattedText,
}
diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs
index 8460f428..7b95fef7 100755
--- a/azalea-protocol/src/packets/game/c_player_position.rs
+++ b/azalea-protocol/src/packets/game/c_player_position.rs
@@ -5,6 +5,7 @@ use crate::common::movements::{PositionMoveRotation, RelativeMovements};
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundPlayerPosition {
+ /// The teleport ID.
#[var]
pub id: u32,
pub change: PositionMoveRotation,
diff --git a/azalea-protocol/src/packets/game/c_projectile_power.rs b/azalea-protocol/src/packets/game/c_projectile_power.rs
index 8b453ae2..d7d445a2 100644
--- a/azalea-protocol/src/packets/game/c_projectile_power.rs
+++ b/azalea-protocol/src/packets/game/c_projectile_power.rs
@@ -1,8 +1,10 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundProjectilePower {
- pub id: u32,
+ #[var]
+ pub id: MinecraftEntityId,
pub acceleration_power: f64,
}
diff --git a/azalea-protocol/src/packets/game/c_remove_entities.rs b/azalea-protocol/src/packets/game/c_remove_entities.rs
index f3eb7139..5424cb3c 100755
--- a/azalea-protocol/src/packets/game/c_remove_entities.rs
+++ b/azalea-protocol/src/packets/game/c_remove_entities.rs
@@ -1,8 +1,9 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundRemoveEntities {
#[var]
- pub entity_ids: Vec<u32>,
+ pub entity_ids: Vec<MinecraftEntityId>,
}
diff --git a/azalea-protocol/src/packets/game/c_remove_mob_effect.rs b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs
index 21500db3..08d9416e 100755
--- a/azalea-protocol/src/packets/game/c_remove_mob_effect.rs
+++ b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs
@@ -1,9 +1,10 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundRemoveMobEffect {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub effect: azalea_registry::MobEffect,
}
diff --git a/azalea-protocol/src/packets/game/c_rotate_head.rs b/azalea-protocol/src/packets/game/c_rotate_head.rs
index 26e55948..d4dec203 100755
--- a/azalea-protocol/src/packets/game/c_rotate_head.rs
+++ b/azalea-protocol/src/packets/game/c_rotate_head.rs
@@ -1,9 +1,10 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundRotateHead {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub y_head_rot: i8,
}
diff --git a/azalea-protocol/src/packets/game/c_set_camera.rs b/azalea-protocol/src/packets/game/c_set_camera.rs
index 4ce4547c..277b80a3 100755
--- a/azalea-protocol/src/packets/game/c_set_camera.rs
+++ b/azalea-protocol/src/packets/game/c_set_camera.rs
@@ -1,8 +1,9 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundSetCamera {
#[var]
- pub camera_id: u32,
+ pub camera_id: MinecraftEntityId,
}
diff --git a/azalea-protocol/src/packets/game/c_set_entity_data.rs b/azalea-protocol/src/packets/game/c_set_entity_data.rs
index afa352ab..fb77163b 100755
--- a/azalea-protocol/src/packets/game/c_set_entity_data.rs
+++ b/azalea-protocol/src/packets/game/c_set_entity_data.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_entity::EntityMetadataItems;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundSetEntityData {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub packed_items: EntityMetadataItems,
}
diff --git a/azalea-protocol/src/packets/game/c_set_entity_link.rs b/azalea-protocol/src/packets/game/c_set_entity_link.rs
index c4ce8bdf..2a38db76 100755
--- a/azalea-protocol/src/packets/game/c_set_entity_link.rs
+++ b/azalea-protocol/src/packets/game/c_set_entity_link.rs
@@ -1,8 +1,9 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundSetEntityLink {
- pub source_id: u32,
- pub dest_id: u32,
+ pub source_id: MinecraftEntityId,
+ pub dest_id: MinecraftEntityId,
}
diff --git a/azalea-protocol/src/packets/game/c_set_entity_motion.rs b/azalea-protocol/src/packets/game/c_set_entity_motion.rs
index d0dd7698..7a112784 100755
--- a/azalea-protocol/src/packets/game/c_set_entity_motion.rs
+++ b/azalea-protocol/src/packets/game/c_set_entity_motion.rs
@@ -1,10 +1,11 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundSetEntityMotion {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub xa: i16,
pub ya: i16,
pub za: i16,
diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs
index 637b2b52..ad691d66 100755
--- a/azalea-protocol/src/packets/game/c_set_equipment.rs
+++ b/azalea-protocol/src/packets/game/c_set_equipment.rs
@@ -4,11 +4,12 @@ use azalea_buf::{AzBuf, BufReadError};
use azalea_buf::{AzaleaRead, AzaleaWrite};
use azalea_inventory::ItemStack;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundSetEquipment {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub slots: EquipmentSlots,
}
diff --git a/azalea-protocol/src/packets/game/c_sound_entity.rs b/azalea-protocol/src/packets/game/c_sound_entity.rs
index fab30b14..37ce1f16 100755
--- a/azalea-protocol/src/packets/game/c_sound_entity.rs
+++ b/azalea-protocol/src/packets/game/c_sound_entity.rs
@@ -1,6 +1,7 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::SoundEvent;
+use azalea_world::MinecraftEntityId;
use super::c_sound::{CustomSound, SoundSource};
@@ -9,7 +10,7 @@ pub struct ClientboundSoundEntity {
pub sound: azalea_registry::Holder<SoundEvent, CustomSound>,
pub source: SoundSource,
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub volume: f32,
pub pitch: f32,
pub seed: u64,
diff --git a/azalea-protocol/src/packets/game/c_take_item_entity.rs b/azalea-protocol/src/packets/game/c_take_item_entity.rs
index 0dfc8552..cfbe33c2 100755
--- a/azalea-protocol/src/packets/game/c_take_item_entity.rs
+++ b/azalea-protocol/src/packets/game/c_take_item_entity.rs
@@ -1,12 +1,13 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundTakeItemEntity {
#[var]
pub item_id: u32,
#[var]
- pub player_id: u32,
+ pub player_id: MinecraftEntityId,
#[var]
pub amount: u32,
}
diff --git a/azalea-protocol/src/packets/game/c_teleport_entity.rs b/azalea-protocol/src/packets/game/c_teleport_entity.rs
index 7073c625..92b8f1eb 100755
--- a/azalea-protocol/src/packets/game/c_teleport_entity.rs
+++ b/azalea-protocol/src/packets/game/c_teleport_entity.rs
@@ -1,13 +1,13 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use azalea_world::MinecraftEntityId;
use crate::common::movements::{PositionMoveRotation, RelativeMovements};
-
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundTeleportEntity {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub change: PositionMoveRotation,
pub relatives: RelativeMovements,
pub on_ground: bool,
diff --git a/azalea-protocol/src/packets/game/c_update_attributes.rs b/azalea-protocol/src/packets/game/c_update_attributes.rs
index 2b800643..e4b334e3 100755
--- a/azalea-protocol/src/packets/game/c_update_attributes.rs
+++ b/azalea-protocol/src/packets/game/c_update_attributes.rs
@@ -2,11 +2,12 @@ use azalea_buf::AzBuf;
use azalea_entity::attributes::AttributeModifier;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::Attribute;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateAttributes {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub values: Vec<AttributeSnapshot>,
}
diff --git a/azalea-protocol/src/packets/game/c_update_mob_effect.rs b/azalea-protocol/src/packets/game/c_update_mob_effect.rs
index 6a31ccab..fe8e8f2e 100755
--- a/azalea-protocol/src/packets/game/c_update_mob_effect.rs
+++ b/azalea-protocol/src/packets/game/c_update_mob_effect.rs
@@ -1,11 +1,12 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::MobEffect;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateMobEffect {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub mob_effect: MobEffect,
#[var]
pub effect_amplifier: u32,
diff --git a/azalea-protocol/src/packets/game/s_entity_tag_query.rs b/azalea-protocol/src/packets/game/s_entity_tag_query.rs
index 619e9e54..4bccee83 100644
--- a/azalea-protocol/src/packets/game/s_entity_tag_query.rs
+++ b/azalea-protocol/src/packets/game/s_entity_tag_query.rs
@@ -1,10 +1,11 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ServerboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
pub struct ServerboundEntityTagQuery {
#[var]
pub transaction_id: u32,
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
}
diff --git a/azalea-protocol/src/packets/game/s_interact.rs b/azalea-protocol/src/packets/game/s_interact.rs
index cdd9cba5..89fc896f 100755
--- a/azalea-protocol/src/packets/game/s_interact.rs
+++ b/azalea-protocol/src/packets/game/s_interact.rs
@@ -3,13 +3,14 @@ use std::io::{Cursor, Write};
use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar};
use azalea_core::position::Vec3;
use azalea_protocol_macros::ServerboundGamePacket;
+use azalea_world::MinecraftEntityId;
use crate::packets::BufReadError;
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
pub struct ServerboundInteract {
#[var]
- pub entity_id: u32,
+ pub entity_id: MinecraftEntityId,
pub action: ActionType,
/// Whether the player is sneaking
pub using_secondary_action: bool,
diff --git a/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs b/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs
index 42032063..73185c9b 100644
--- a/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs
+++ b/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs
@@ -1,9 +1,10 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ServerboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
pub struct ServerboundPickItemFromEntity {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub include_data: bool,
}
diff --git a/azalea-protocol/src/packets/game/s_player_command.rs b/azalea-protocol/src/packets/game/s_player_command.rs
index 72a92310..f620b847 100755
--- a/azalea-protocol/src/packets/game/s_player_command.rs
+++ b/azalea-protocol/src/packets/game/s_player_command.rs
@@ -1,10 +1,11 @@
use azalea_buf::AzBuf;
use azalea_protocol_macros::ServerboundGamePacket;
+use azalea_world::MinecraftEntityId;
#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
pub struct ServerboundPlayerCommand {
#[var]
- pub id: u32,
+ pub id: MinecraftEntityId,
pub action: Action,
#[var]
pub data: u32,