Implement simple hash based equals in Fluid ContainerKey.

This commit is contained in:
Lex Manos 2014-03-10 22:51:31 -07:00
parent 534b241e9f
commit d97ec2763c

View file

@ -54,6 +54,11 @@ public abstract class FluidContainerRegistry
code = 31*code + fluid.fluidID; code = 31*code + fluid.fluidID;
return code; return code;
} }
@Override
public boolean equals(Object o)
{
return o != null && o.hashCode() == hashCode();
}
} }
private static Map<ContainerKey, FluidContainerData> containerFluidMap = Maps.newHashMap(); private static Map<ContainerKey, FluidContainerData> containerFluidMap = Maps.newHashMap();