From 1707573f7d0cb01980f582178a372e663876ee9e Mon Sep 17 00:00:00 2001 From: mezz Date: Sat, 21 May 2016 20:35:52 -0700 Subject: [PATCH] Fix crash when right clicking with a can or capsule on a regular block --- src/main/java/forestry/core/items/ItemLiquidContainer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/forestry/core/items/ItemLiquidContainer.java b/src/main/java/forestry/core/items/ItemLiquidContainer.java index 11c158b2a..eba27b140 100755 --- a/src/main/java/forestry/core/items/ItemLiquidContainer.java +++ b/src/main/java/forestry/core/items/ItemLiquidContainer.java @@ -94,6 +94,10 @@ public class ItemLiquidContainer extends ItemForestry implements IColoredItem { } } + if (fluid == null) { + return ActionResult.newResult(EnumActionResult.FAIL, itemStackIn); + } + ItemStack filledContainer = FluidHelper.getFilledContainer(fluid.getFluid(), itemStackIn); if (filledContainer == null) { return ActionResult.newResult(EnumActionResult.FAIL, itemStackIn);