diff --git a/steel-registry/src/entity_types.rs b/steel-registry/src/entity_types.rs index d5f7bf25484..8f9f09c183c 100644 --- a/steel-registry/src/entity_types.rs +++ b/steel-registry/src/entity_types.rs @@ -16,7 +16,7 @@ pub enum MobCategory { /// Entity dimensions used for bounding box calculation. /// Bounding box is centered on X/Z with Y at entity feet. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct EntityDimensions { pub width: f32, pub height: f32, @@ -52,7 +52,7 @@ impl EntityDimensions { } /// Behavioral flags for entity collision and interaction. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct EntityFlags { pub is_pushable: bool, pub is_attackable: bool, @@ -95,6 +95,13 @@ pub struct EntityType { pub type EntityTypeRef = &'static EntityType; +impl PartialEq for EntityTypeRef { + #[expect(clippy::disallowed_methods)] // This IS the PartialEq impl; ptr::eq is correct here + fn eq(&self, other: &Self) -> bool { + std::ptr::eq(*self, *other) + } +} + pub struct EntityTypeRegistry { types_by_id: Vec, types_by_key: FxHashMap,