mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Update equality check for RegistryObject to include RegistryObject#key. (#10857)
This commit is contained in:
parent
75f340f2a4
commit
a11d1936c5
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue