Update equality check for RegistryObject to include RegistryObject#key. (#10860)

This commit is contained in:
Meme Man authored and GitHub committed 2026-07-21 10:32:48 -07:00
1 parent da353a52fe
commit 3f1e9a90c9
1 file changed
+2 -2
@@ -481,8 +481,8 @@ public final class RegistryObject<T> implements Supplier<T> {
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj instanceof RegistryObject o) {
return Objects.equals(o.name, name);
if (obj instanceof RegistryObject<?> o) {
return o.key == key && Objects.equals(o.name, name);
}
return false;
}