mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
properly implement equals, sod off Player.
This commit is contained in:
1 parent
d97ec2763c
commit
1a9e13f880
1 file changed
+8
-1
@@ -57,7 +57,14 @@ public abstract class FluidContainerRegistry
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return o != null && o.hashCode() == hashCode();
|
||||
if (!(o instanceof ContainerKey)) return false;
|
||||
ContainerKey ck = (ContainerKey)o;
|
||||
if (container.getItem() != ck.container.getItem()) return false;
|
||||
if (container.getItemDamage() != ck.container.getItemDamage()) return false;
|
||||
if (fluid == null && ck.fluid != null) return false;
|
||||
if (fluid != null && ck.fluid == null) return false;
|
||||
if (fluid.fluidID != ck.fluid.fluidID) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user