aboutsummaryrefslogtreecommitdiff
path: root/azalea-registry/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-03-13 20:46:12 +0000
committermat <git@matdoes.dev>2025-03-13 20:46:12 +0000
commit65fe07215149ab81d0862ab7edac71d6a8417ef8 (patch)
tree9e06778329cbf9a14f87c93d1a3686f6b91f2b4e /azalea-registry/src
parent7a192acc99358818c2f90cf4e2b8b236f91cfbf7 (diff)
downloadazalea-drasl-65fe07215149ab81d0862ab7edac71d6a8417ef8.tar.xz
fix wrong Consumable component implementation and add set_equipment test
Diffstat (limited to 'azalea-registry/src')
-rwxr-xr-xazalea-registry/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
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<R: Registry + Clone, Direct: AzaleaRead + AzaleaWrite + Clone> Clone for Ho
}
}
}
+impl<R: Registry + PartialEq, Direct: AzaleaRead + AzaleaWrite + PartialEq> PartialEq
+ for Holder<R, Direct>
+{
+ 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<SoundEvent, azalea_core::sound::CustomSound>` instead.
enum SoundEvent {
EntityAllayAmbientWithItem => "minecraft:entity.allay.ambient_with_item",
EntityAllayAmbientWithoutItem => "minecraft:entity.allay.ambient_without_item",