mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
Update equality check for RegistryObject to include RegistryObject#key. (#10864)
This commit is contained in:
1 parent
afaba58edc
commit
fba9c66164
1 file changed
+2
-2
@@ -467,8 +467,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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user