Add extra null check to canFillFluidType (#1006)

Prevents crashes when canFillFluidType(null) is called
This commit is contained in:
dalapo 2018-01-17 10:22:55 -08:00 committed by Brennan Ward
parent b13d7a031e
commit 82de1c3dd2

View file

@ -35,7 +35,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn
@Override
public boolean canFillFluidType(FluidStack stack){
Fluid fluid = stack.getFluid();
Fluid fluid = stack == null ? null : stack.getFluid();
return fluid != null && getRecipeForFluid(fluid.getName()) != null;
}
};