Made LiquidStack.isLiquidEqual(ItemStack) properly check the contained liquid, in addition to obvious id/meta closes #399 and closes #403

This commit is contained in:
LexManos committed 2013-02-15 04:00:46 -08:00
1 parent 6e302a1350
commit 0a2e78d0c6
1 file changed
+11 -1
@@ -75,7 +75,17 @@ public class LiquidStack
*/
public boolean isLiquidEqual(ItemStack other)
{
return other != null && itemID == other.itemID && itemMeta == other.getItemDamage();
if (other == null)
{
return false;
}
if (itemID == other.itemID && itemMeta == other.getItemDamage())
{
return true;
}
return isLiquidEqual(LiquidContainerRegistry.getLiquidForFilledItem(other));
}
/**