From 0a2e78d0c6cb031eb86294d50f74c4a120bc42e0 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 15 Feb 2013 04:00:46 -0800 Subject: [PATCH] Made LiquidStack.isLiquidEqual(ItemStack) properly check the contained liquid, in addition to obvious id/meta closes #399 and closes #403 --- common/net/minecraftforge/liquids/LiquidStack.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/net/minecraftforge/liquids/LiquidStack.java b/common/net/minecraftforge/liquids/LiquidStack.java index 50d0a76f66..345dfdf0d4 100644 --- a/common/net/minecraftforge/liquids/LiquidStack.java +++ b/common/net/minecraftforge/liquids/LiquidStack.java @@ -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)); } /**