// Path: src/main/java/openccsensors/api/IRequiresIconLoading.java
// public interface IRequiresIconLoading {
// 	public void loadIcon(IIconRegister iconRegistry);
// }
// 
// Path: src/main/java/openccsensors/api/ISensor.java
// public interface ISensor {
// 	HashMap getDetails(World world, Object obj, ChunkCoordinates location, boolean additional);
// 	HashMap getTargets(World world, ChunkCoordinates location, ISensorTier tier);
// 	String[] getCustomMethods(ISensorTier tier);
// 	Object callCustomMethod(World world, ChunkCoordinates location, int methodID, Object[] args, ISensorTier tier) throws Exception;
// 	String getName();
// 	IIcon getIcon();
// 	ItemStack getUniqueRecipeItem();
// }
// 
// Path: src/main/java/openccsensors/api/ISensorTier.java
// public interface ISensorTier {
// 	
// 	public EnumItemRarity getRarity();
// 	public double getMultiplier();
// 	public String getName();
// 	public IIcon getIcon();
// 	
// }


import java.util.HashMap;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import openccsensors.api.IGaugeSensor;
import openccsensors.api.IRequiresIconLoading;
import openccsensors.api.ISensor;
import openccsensors.api.ISensorTier;
import openccsensors.common.util.TankUtils;
package openccsensors.common.sensor;



public class TankSensor extends TileSensor implements ISensor, IRequiresIconLoading, IGaugeSensor {
	
	private IIcon icon;
	private String[] gaugeProperties = new String[] {
			"PercentFull"	
		};

	@Override
	public boolean isValidTarget(Object tile) {
		if (tile instanceof IFluidHandler) {
			FluidTankInfo[] tanks = ((IFluidHandler)tile).getTankInfo(ForgeDirection.UNKNOWN);
			if (tanks != null) {
				return tanks.length > 0;
			}
		}
		return false;
	}

	@Override
	public HashMap getDetails(World world, Object obj, ChunkCoordinates sensorPos, boolean additional) {
		TileEntity tile = (TileEntity) obj;
		HashMap response = super.getDetails(tile, sensorPos);
		response.put("Tanks", TankUtils.fluidHandlerToMap((IFluidHandler)tile));
		return response;
	}
	
// Path: src/main/java/openccsensors/api/IRequiresIconLoading.java
// public interface IRequiresIconLoading {
// 	public void loadIcon(IIconRegister iconRegistry);
// }
// 
// Path: src/main/java/openccsensors/api/ISensor.java
// public interface ISensor {
// 	HashMap getDetails(World world, Object obj, ChunkCoordinates location, boolean additional);
// 	HashMap getTargets(World world, ChunkCoordinates location, ISensorTier tier);
// 	String[] getCustomMethods(ISensorTier tier);
// 	Object callCustomMethod(World world, ChunkCoordinates location, int methodID, Object[] args, ISensorTier tier) throws Exception;
// 	String getName();
// 	IIcon getIcon();
// 	ItemStack getUniqueRecipeItem();
// }
// 
// Path: src/main/java/openccsensors/api/ISensorTier.java
// public interface ISensorTier {
// 	
// 	public EnumItemRarity getRarity();
// 	public double getMultiplier();
// 	public String getName();
// 	public IIcon getIcon();
// 	
// }


// Path: src/main/java/openccsensors/common/sensor/TankSensor.java
import java.util.HashMap;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import openccsensors.api.IGaugeSensor;
import openccsensors.api.IRequiresIconLoading;
import openccsensors.api.ISensor;
import openccsensors.api.ISensorTier;
import openccsensors.common.util.TankUtils;

package openccsensors.common.sensor;



public class TankSensor extends TileSensor implements ISensor, IRequiresIconLoading, IGaugeSensor {
	
	private IIcon icon;
	private String[] gaugeProperties = new String[] {
			"PercentFull"	
		};

	@Override
	public boolean isValidTarget(Object tile) {
		if (tile instanceof IFluidHandler) {
			FluidTankInfo[] tanks = ((IFluidHandler)tile).getTankInfo(ForgeDirection.UNKNOWN);
			if (tanks != null) {
				return tanks.length > 0;
			}
		}
		return false;
	}

	@Override
	public HashMap getDetails(World world, Object obj, ChunkCoordinates sensorPos, boolean additional) {
		TileEntity tile = (TileEntity) obj;
		HashMap response = super.getDetails(tile, sensorPos);
		response.put("Tanks", TankUtils.fluidHandlerToMap((IFluidHandler)tile));
		return response;
	}
	
	@Override