package micdoodle8.mods.galacticraft.planets.venus.items; import micdoodle8.mods.galacticraft.core.GalacticraftCore; import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; import micdoodle8.mods.galacticraft.core.items.ISortableItem; import micdoodle8.mods.galacticraft.core.proxy.ClientProxyCore; import micdoodle8.mods.galacticraft.core.util.EnumColor; import micdoodle8.mods.galacticraft.core.util.EnumSortCategoryItem; import micdoodle8.mods.galacticraft.core.util.GCCoreUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; public class ItemBatteryAtomic extends ItemElectricBase implements ISortableItem { public ItemBatteryAtomic(String assetName) { super(); this.setUnlocalizedName(assetName); } @Override protected void setMaxTransfer() { this.transferMax = 6; } @Override public int getTierGC(ItemStack itemStack) { return 2; } @Override public CreativeTabs getCreativeTab() { return GalacticraftCore.galacticraftItemsTab; } @Override @SideOnly(Side.CLIENT) public EnumRarity getRarity(ItemStack par1ItemStack) { return ClientProxyCore.galacticraftItem; } @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> tooltip, boolean par4) { tooltip.add(EnumColor.DARK_GREEN + GCCoreUtil.translate("gui.infinite_item.desc")); tooltip.add(EnumColor.ORANGE + GCCoreUtil.translate("gui.message.low_energy_output.name")); } @Override public float getElectricityStored(ItemStack itemStack) { return this.getMaxElectricityStored(itemStack); } @Override public void setElectricity(ItemStack itemStack, float joules) { } @Override public float getMaxElectricityStored(ItemStack itemStack) { return Float.POSITIVE_INFINITY; } @Override public float getTransfer(ItemStack itemStack) { return 0.0F; } @Override public float recharge(ItemStack theItem, float energy, boolean doReceive) { return 0F; } @Override public float discharge(ItemStack theItem, float energy, boolean doTransfer) { return super.discharge(theItem, energy, doTransfer); } @Override public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) { par3List.add(new ItemStack(par1, 1, 0)); } @Override public EnumSortCategoryItem getCategory(int meta) { return EnumSortCategoryItem.GENERAL; } }