package xyz.brassgoggledcoders.steamagerevolution.modules.storage.items;

import com.teamacronymcoders.base.items.ItemBase;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack;

public class ItemCanister extends ItemBase {

	private int capacity;

	public ItemCanister(String name, int capacity) {
		super(name);
		this.setMaxStackSize(1);
		this.setHasSubtypes(true);
		this.capacity = capacity;
	}

	// @SideOnly(Side.CLIENT)
	// @Override
	// public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> subItems) {
	// // empty
	// subItems.add(new ItemStack(item));
	// for(Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
	// ItemStack filledStack = new ItemStack(item);
	// filledStack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null)
	// .fill(new FluidStack(fluid, capacity), true);
	// subItems.add(filledStack);
	// }
	// }

	@Override
	public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) {
		return new FluidHandlerItemStack(stack, capacity);
	}
}

@@ -78,51 +78,211 @@
 ort 
-com.teamacronymcoders.base.items.ItemBase;%0A
+java.util.List;%0A%0Aimport javax.annotation.Nullable;%0A%0Aimport com.teamacronymcoders.base.items.IHasSubItems;%0Aimport com.teamacronymcoders.base.items.ItemBase;%0A%0Aimport net.minecraft.client.util.ITooltipFlag;
 %0Aimp
@@ -356,16 +356,50 @@
 mpound;%0A
+import net.minecraft.world.World;%0A
 import n
@@ -494,50 +494,429 @@
 ids.
-capability.templates.FluidHandlerItemStack
+Fluid;%0Aimport net.minecraftforge.fluids.FluidRegistry;%0Aimport net.minecraftforge.fluids.FluidStack;%0Aimport net.minecraftforge.fluids.capability.CapabilityFluidHandler;%0Aimport net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack;%0Aimport net.minecraftforge.fml.relauncher.Side;%0Aimport net.minecraftforge.fml.relauncher.SideOnly;%0Aimport xyz.brassgoggledcoders.steamagerevolution.modules.storage.ModuleStorage
 ;%0A%0Ap
@@ -957,16 +957,40 @@
 temBase 
+implements IHasSubItems 
 %7B%0A%0A%09priv
@@ -1162,19 +1162,27 @@
 y;%0A%09%7D%0A%0A%09
-// 
+@Override%0A%09
 @SideOnl
@@ -1201,162 +1201,534 @@
 T)%0A%09
-// @Override%0A%09// public void getSubItems(Item item, CreativeTabs tab, List%3CItemStack%3E subItems) %7B%0A%09// // empty%0A%09// subItems.add(new ItemStack(item));%0A%09// 
+public void addInformation(ItemStack stack, @Nullable World player, List%3CString%3E tooltip, ITooltipFlag advanced) %7B%0A%09%09FluidStack fluid = ((FluidHandlerItemStack) stack%0A%09%09%09%09.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null)).getFluid();%0A%09%09if(fluid.getFluid() == null) %7B%0A%09%09%09tooltip.add(%22Empty%22);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09tooltip.add(FluidRegistry.getFluidName(fluid));%0A%09%09%7D%0A%09%09tooltip.add(fluid.amount + %22mB/%22 + capacity + %22mB%22);%0A%09%7D%0A%0A%09@Override%0A%09public List%3CItemStack%3E getAllSubItems(List%3CItemStack%3E itemStacks) %7B%0A%09%09
 for(
@@ -1790,19 +1790,18 @@
 s()) %7B%0A%09
-// 
+%09%09
 ItemStac
@@ -1834,19 +1834,36 @@
 ack(
-item
+ModuleStorage.canister
 );%0A%09
-// 
+%09%09
 fill
@@ -1921,16 +1921,21 @@
 HANDLER_
+ITEM_
 CAPABILI
@@ -1945,19 +1945,20 @@
  null)%0A%09
-// 
+%09%09%09%09
 .fill(ne
@@ -2000,18 +2000,19 @@
 );%0A%09
-// subItem
+%09%09itemStack
 s.ad
@@ -2032,17 +2032,33 @@
 );%0A%09
-// %7D%0A%09// 
+%09%7D%0A%09%09return itemStacks;%0A%09
 %7D%0A%0A%09

Fix canister sub items and add tooltip