@Override public boolean canDrain() { return internalTankProperties.canDrain(); }
high = Math.max( high, slot ); final FluidStack newIS = !props[slot].canDrain() && this.getMode() == StorageFilter.EXTRACTABLE_ONLY ? null : props[slot].getContents(); final FluidStack oldIS = old == null ? null : old.fluidStack;
private static boolean canDrain(IFluidHandler fluidHandler) { for (IFluidTankProperties properties : fluidHandler.getTankProperties()) { if (properties.canDrain()) { return true; } } return false; }
public static boolean isDrainableContainer(ItemStack container) { IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); if (fluidHandler == null) { return false; } IFluidTankProperties[] tankProperties = fluidHandler.getTankProperties(); for (IFluidTankProperties properties : tankProperties) { if (properties.canDrain()) { return true; } } return false; }
public static boolean isDrainableFilledContainer(ItemStack container) { IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); if (fluidHandler == null) { return false; } IFluidTankProperties[] tankProperties = fluidHandler.getTankProperties(); for (IFluidTankProperties properties : tankProperties) { if (!properties.canDrain()) { return false; } FluidStack contents = properties.getContents(); if (contents == null || contents.amount < properties.getCapacity()) { return false; } } return true; }
public static boolean isDrainableFilledContainer(ItemStack container) { IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); if (fluidHandler == null) { return false; } IFluidTankProperties[] tankProperties = fluidHandler.getTankProperties(); for (IFluidTankProperties properties : tankProperties) { if (!properties.canDrain()) { return false; } FluidStack contents = properties.getContents(); if (contents == null || contents.amount < properties.getCapacity()) { return false; } } return true; }
public static boolean isDrainableFilledContainer(ItemStack container) { IFluidHandler fluidHandler = FluidUtil.getFluidHandler(container); if (fluidHandler == null) { return false; } IFluidTankProperties[] tankProperties = fluidHandler.getTankProperties(); for (IFluidTankProperties properties : tankProperties) { if (!properties.canDrain()) { return false; } FluidStack contents = properties.getContents(); if (contents == null || contents.amount <= 0) { return false; } } return fluidHandler.drain(Integer.MAX_VALUE, false) != null; } }
contents == null ? 0 : contents.amount, properties.getCapacity(), Boolean.toString(properties.canFill()), Boolean.toString(properties.canDrain())));
if (tankProperties != null) { for (IFluidTankProperties properties : tankProperties) { if (properties.canDrain() && properties.getCapacity() > 0) { FluidStack contents = properties.getContents(); if (contents != null) {