// Path: src/java/cd4017be/indlog/util/IFluidPipeCon.java
// public interface IFluidPipeCon {
// 
// 	/**
// 	 * @param s side to connect from
// 	 * @return preferred transfer direction: 0 = none, 1 = in, 2 = out, 3 = both
// 	 */
// 	public byte getFluidConnectDir(EnumFacing s);
// 
// }
// 
// Path: src/java/cd4017be/indlog/util/filter/DummyFilter.java
// @SideOnly(Side.CLIENT)
// public class DummyFilter<Obj, Inv> extends FilterBase<Obj, Inv> {
// 
// 	public DummyFilter(byte mode) {
// 		this.mode = mode;
// 	}
// 
// 	@Override
// 	public boolean matches(Obj obj) {
// 		return true;
// 	}
// 
// 	@Override
// 	public boolean noEffect() {
// 		return true;
// 	}
// 
// 	@Override
// 	public Item item() {
// 		return ItemStack.EMPTY.getItem();
// 	}
// 
// 	@Override
// 	public int insertAmount(Obj obj, Inv inv) {
// 		return 0;
// 	}
// 
// 	@Override
// 	public Obj getExtract(Obj obj, Inv inv) {
// 		return null;
// 	}
// 
// 	@Override
// 	public boolean transfer(Obj obj) {
// 		return true;
// 	}
// 
// }
// 
// Path: src/java/cd4017be/indlog/util/filter/FluidFilterProvider.java
// public interface FluidFilterProvider {
// 
// 	/**
// 	 * @param stack the actual stack representing the filter or null if created directly from NBT
// 	 * @return a new filter instance provided by this item
// 	 */
// 	PipeFilter<FluidStack, IFluidHandler> getFluidFilter(@Nullable ItemStack stack);
// 
// 	public static PipeFilter<FluidStack, IFluidHandler> load(NBTTagCompound nbt) {
// 		Item item;
// 		if (nbt.hasKey("id", NBT.TAG_STRING)) item = Item.getByNameOrId(nbt.getString("id"));
// 		else item = Item.getByNameOrId("indlog:fluid_filter"); //backward compatibility
// 		if (item instanceof FluidFilterProvider) {
// 			PipeFilter<FluidStack, IFluidHandler> filter = ((FluidFilterProvider)item).getFluidFilter(null);
// 			if (filter != null) filter.deserializeNBT(nbt);
// 			return filter;
// 		} else return null;
// 	}
// 
// }


import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;
import cd4017be.indlog.util.IFluidPipeCon;
import cd4017be.indlog.util.filter.DummyFilter;
import cd4017be.indlog.util.filter.FluidFilterProvider;
import cd4017be.lib.capability.LinkedTank;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
	}

	@Override
	public boolean shouldRenderInPass(int pass) {
		return pass == 1 && !cover.opaque;
	}

	private class Tank extends LinkedTank {

		public Tank(int cap, Supplier<FluidStack> get, Consumer<FluidStack> set) {
			super(cap, get, set);
		}

		@Override
		public int fill(FluidStack res, boolean doFill) {
			if ((type & 1) == 0 && (filter == null || filter.matches(res)))
				return super.fill(res, doFill);
			return 0;
		}

		@Override
		public FluidStack drain(FluidStack res, boolean doDrain) {
			if (content != null && (type & 1) != 0 && (filter == null || filter.matches(content)))
				return super.drain(res, doDrain);
			return null;
		}

		@Override
		public FluidStack drain(int m, boolean doDrain) {
			if (content != null && (type & 1) != 0 && (filter == null || filter.matches(content)))
// Path: src/java/cd4017be/indlog/util/IFluidPipeCon.java
// public interface IFluidPipeCon {
// 
// 	/**
// 	 * @param s side to connect from
// 	 * @return preferred transfer direction: 0 = none, 1 = in, 2 = out, 3 = both
// 	 */
// 	public byte getFluidConnectDir(EnumFacing s);
// 
// }
// 
// Path: src/java/cd4017be/indlog/util/filter/DummyFilter.java
// @SideOnly(Side.CLIENT)
// public class DummyFilter<Obj, Inv> extends FilterBase<Obj, Inv> {
// 
// 	public DummyFilter(byte mode) {
// 		this.mode = mode;
// 	}
// 
// 	@Override
// 	public boolean matches(Obj obj) {
// 		return true;
// 	}
// 
// 	@Override
// 	public boolean noEffect() {
// 		return true;
// 	}
// 
// 	@Override
// 	public Item item() {
// 		return ItemStack.EMPTY.getItem();
// 	}
// 
// 	@Override
// 	public int insertAmount(Obj obj, Inv inv) {
// 		return 0;
// 	}
// 
// 	@Override
// 	public Obj getExtract(Obj obj, Inv inv) {
// 		return null;
// 	}
// 
// 	@Override
// 	public boolean transfer(Obj obj) {
// 		return true;
// 	}
// 
// }
// 
// Path: src/java/cd4017be/indlog/util/filter/FluidFilterProvider.java
// public interface FluidFilterProvider {
// 
// 	/**
// 	 * @param stack the actual stack representing the filter or null if created directly from NBT
// 	 * @return a new filter instance provided by this item
// 	 */
// 	PipeFilter<FluidStack, IFluidHandler> getFluidFilter(@Nullable ItemStack stack);
// 
// 	public static PipeFilter<FluidStack, IFluidHandler> load(NBTTagCompound nbt) {
// 		Item item;
// 		if (nbt.hasKey("id", NBT.TAG_STRING)) item = Item.getByNameOrId(nbt.getString("id"));
// 		else item = Item.getByNameOrId("indlog:fluid_filter"); //backward compatibility
// 		if (item instanceof FluidFilterProvider) {
// 			PipeFilter<FluidStack, IFluidHandler> filter = ((FluidFilterProvider)item).getFluidFilter(null);
// 			if (filter != null) filter.deserializeNBT(nbt);
// 			return filter;
// 		} else return null;
// 	}
// 
// }


// Path: src/java/cd4017be/indlog/tileentity/FluidPipe.java
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;
import cd4017be.indlog.util.IFluidPipeCon;
import cd4017be.indlog.util.filter.DummyFilter;
import cd4017be.indlog.util.filter.FluidFilterProvider;
import cd4017be.lib.capability.LinkedTank;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;

	}

	@Override
	public boolean shouldRenderInPass(int pass) {
		return pass == 1 && !cover.opaque;
	}

	private class Tank extends LinkedTank {

		public Tank(int cap, Supplier<FluidStack> get, Consumer<FluidStack> set) {
			super(cap, get, set);
		}

		@Override
		public int fill(FluidStack res, boolean doFill) {
			if ((type & 1) == 0 && (filter == null || filter.matches(res)))
				return super.fill(res, doFill);
			return 0;
		}

		@Override
		public FluidStack drain(FluidStack res, boolean doDrain) {
			if (content != null && (type & 1) != 0 && (filter == null || filter.matches(content)))
				return super.drain(res, doDrain);
			return null;
		}

		@Override
		public FluidStack drain(int m, boolean doDrain) {
			if (content != null && (type & 1) != 0 && (filter == null || filter.matches(content)))
				return super.drain(m, doDrain);