From 65fe07215149ab81d0862ab7edac71d6a8417ef8 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 13 Mar 2025 20:46:12 +0000 Subject: fix wrong Consumable component implementation and add set_equipment test --- azalea-registry/src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'azalea-registry') diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index 4f72689f..59b8101f 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -194,6 +194,17 @@ impl Clone for Ho } } } +impl PartialEq + for Holder +{ + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::Reference(a), Self::Reference(b)) => a == b, + (Self::Direct(a), Self::Direct(b)) => a == b, + _ => false, + } + } +} registry! { /// The AI code that's currently being executed for the entity. @@ -3832,6 +3843,10 @@ enum SensorKind { } registry! { +/// A known type of sound in Minecraft. +/// +/// If you need to support custom sounds from resource packs, you should use +/// `azalea_registry::Holder` instead. enum SoundEvent { EntityAllayAmbientWithItem => "minecraft:entity.allay.ambient_with_item", EntityAllayAmbientWithoutItem => "minecraft:entity.allay.ambient_without_item", -- cgit v1.2.3