mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
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:
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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user