Added checks for null and equal class to .equals()
Also switched a check for null in OreHelper#sameOre to prevent null == null => true
This commit is contained in:
@@ -54,7 +54,12 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return blk == ((Combo) obj).blk && meta == ((Combo) obj).meta;
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
return false;
|
||||
Combo other = (Combo) obj;
|
||||
return blk == other.blk && meta == other.meta;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user