@@ -0,0 +1,3139 @@
+package org.obsidianbox.magma.item;%0A%0Aimport cpw.mods.fml.common.registry.GameRegistry;%0Aimport cpw.mods.fml.relauncher.Side;%0Aimport cpw.mods.fml.relauncher.SideOnly;%0Aimport net.minecraft.client.renderer.texture.IIconRegister;%0Aimport net.minecraft.client.resources.I18n;%0Aimport net.minecraft.entity.player.EntityPlayer;%0Aimport net.minecraft.item.ItemBow;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.IIcon;%0A%0Aimport org.obsidianbox.magma.addon.Addon;%0Aimport org.obsidianbox.magma.lang.Languages;%0A%0Apublic class SimpleBow extends ItemBow %7B%0A    private final Addon addon;%0A    private final String identifier;%0A    private final IIcon%5B%5D icons = new IIcon%5B3%5D;%0A%0A    public SimpleBow(Addon addon, String identifier, String displayName, boolean showInCreativeTab, int maxDurability) %7B%0A        this.addon = addon;%0A        this.identifier = identifier;%0A        setMaxDamage(maxDurability);%0A        setTextureName(addon.getDescription().getIdentifier() + %22:bows/%22 + identifier);%0A        addon.getGame().getLanguages().put(addon, Languages.ENGLISH_AMERICAN, %22item.%22 + identifier + %22.name%22, displayName);%0A        if (showInCreativeTab) %7B%0A            setCreativeTab(addon.getGame().getTabs());%0A        %7D%0A        GameRegistry.registerItem(this, addon.getDescription().getIdentifier() + %22_%22 + identifier);%0A    %7D%0A%0A    @SideOnly(Side.CLIENT)%0A    @Override%0A    public void registerIcons(IIconRegister icon) %7B%0A        itemIcon = icon.registerIcon(this.getIconString() + %22_standby%22);%0A        for (int i = 0; i %3C icons.length; i++) %7B%0A            icons%5Bi%5D = icon.registerIcon(this.getIconString() + %22_pulling_%22 + i);%0A        %7D%0A    %7D%0A%0A    @SideOnly(Side.CLIENT)%0A    @Override%0A    public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack stack2, int useRemaining) %7B%0A        final int time = stack.getMaxItemUseDuration() - useRemaining;%0A        if (time %3E= 18) %7B%0A            return icons%5B2%5D;%0A        %7D else if (time %3E 13) %7B%0A            return icons%5B1%5D;%0A        %7D else if (time %3E 0) %7B%0A            return icons%5B0%5D;%0A        %7D else %7B%0A            return itemIcon;%0A        %7D%0A    %7D%0A%0A    @SideOnly(Side.CLIENT)%0A    @Override%0A    public IIcon getItemIconForUseDuration(int state) %7B%0A        return icons%5Bstate%5D;%0A    %7D%0A%0A    public final Addon getAddon() %7B%0A        return addon;%0A    %7D%0A%0A    public final String getIdentifier() %7B%0A        return identifier;%0A    %7D%0A%0A    @Override%0A    public String getUnlocalizedName() %7B%0A        return addon.getDescription().getIdentifier() + %22.item.%22 + identifier;%0A    %7D%0A%0A    @Override%0A    public String getItemStackDisplayName(ItemStack stack) %7B%0A        return I18n.format(getUnlocalizedName() + %22.name%22);%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (!(o instanceof SimpleBow)) %7B%0A            return false;%0A        %7D%0A%0A        final SimpleBow that = (SimpleBow) o;%0A%0A        return addon.equals(that.addon) && identifier.equals(that.identifier);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = addon.hashCode();%0A        result = 31 * result + identifier.hashCode();%0A        return result;%0A    %7D%0A%7D%0A

Add SimpleBow