package WayofTime.alchemicalWizardry.common.tileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.Constants; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; public class TEBellJar extends TEReagentConduit { public TEBellJar() { super(1, 16000); this.maxConnextions = 1; this.affectedByRedstone = false; } public int getRSPowerOutput() { ReagentContainer thisTank = this.tanks[0]; if(thisTank != null) { ReagentStack stack = thisTank.getReagent(); if(stack != null) { return (15*stack.amount/thisTank.getCapacity()); } } return 0; } public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack) { if(stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock)stack.getItem()).field_150939_a) { NBTTagCompound tag = stack.getTagCompound(); if(tag != null) { NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND); int size = tagList.tagCount(); ReagentContainer[] tanks = new ReagentContainer[size]; ReagentContainerInfo[] infos = new ReagentContainerInfo[size]; for(int i=0; i