Skip to content

Commit

Permalink
Adding a debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nedelosk committed Dec 12, 2016
1 parent 65712ad commit f9b8b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/forestry/core/fluids/FluidHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import forestry.core.utils.ItemStackUtil;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
Expand All @@ -39,6 +40,9 @@ public static boolean areFluidStacksEqual(FluidStack fluidStack1, FluidStack flu
public static boolean canAcceptFluid(World world, BlockPos pos, EnumFacing facing, FluidStack fluid) {
IFluidHandler capability = FluidUtil.getFluidHandler(world, pos, facing);
if (capability != null) {
if(capability.getTankProperties() == null){
throw new NullPointerException("The fluid handler " + capability.toString() + " returns null in the method getTankProperties, this is not allowed, please report that to the author of the mod from that the handler is.");
}
for (IFluidTankProperties tankProperties : capability.getTankProperties()) {
if (tankProperties.canFillFluidType(fluid)) {
return true;
Expand Down

0 comments on commit f9b8b89

Please sign in to comment.