Jump to content

Recommended Posts

Posted

good days

bad english advertishment

 

i have like two days triying to figure this.

 

a have a vara and i wand to charge this vara after shot ind a want it to change their look on the charge process so i take the bow for starting point , the bow change skin on charge using skins named bow__standby.png, bow_pulling_0.png, bow_pulling_1.png, bow_pulling_2.png

soo i create mi textures for mi vara in mi textures folder modmercenario/textures/items/

 

varamercenaria00_pulling_0.png

varamercenaria00_pulling_1.png

varamercenaria00_pulling_2.png

varamercenaria00_standby.png

 

but minecraft refuses to load mi textures and insist in search in minecraft textures folder

06:47:15] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/varamercenaria00_pulling_0.png

 

it mus be something like  modmercenario:textures/items/varamercenaria00_pulling_0.png

 

where is mi wrong doing ??

 

 

the code of mi vara

 

//##############################################################################

 

package mercenary00.mercenarymod.items;

 

 

import java.io.IOException;

 

import net.minecraft.init.Items;

import mercenary00.mercenarymod.utilidades.cfg;

import net.minecraft.item.EnumAction;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import mercenary00.mercenarymod.Mercenary;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.Item;

import net.minecraft.util.IChatComponent;

import net.minecraft.util.IIcon;

import net.minecraft.util.MovingObjectPosition;

import net.minecraft.world.World;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.event.entity.player.ArrowNockEvent;

import mercenary00.mercenarymod.utilidades.util;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.enchantment.Enchantment;

import net.minecraft.enchantment.EnchantmentHelper;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.projectile.EntityArrow;

import net.minecraft.init.Items;

import net.minecraft.util.IIcon;

import net.minecraft.world.World;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.event.entity.player.ArrowLooseEvent;

import net.minecraftforge.event.entity.player.ArrowNockEvent;

 

 

public class varaMercenaria00 extends Item{

 

public static String name="varamercenaria00";

public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"};

@SideOnly(Side.CLIENT)

private IIcon[] iconArray;

private static final String __OBFID = "CL_00001777";

 

 

//#############################################################################################

public varaMercenaria00() {

setUnlocalizedName(Mercenary.MODID + "_" + name);

GameRegistry.registerItem(this, name);

setCreativeTab(CreativeTabs.tabTools);

//  setTextureName(Mercenary.MODID + ":" + name);

    this.maxStackSize = 1;

    this.setMaxDamage(500);

    this.setCreativeTab(CreativeTabs.tabCombat);

 

 

}

//#############################################################################################

//#############################################################################################

 

 

 

 

    public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_)

    {

        int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;

 

        ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);

        MinecraftForge.EVENT_BUS.post(event);

        if (event.isCanceled())

        {

            return;

        }

        j = event.charge;

 

        boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;

 

        if (flag || p_77615_3_.inventory.hasItem(Items.arrow))

        {

            float f = (float)j / 20.0F;

            f = (f * f + f * 2.0F) / 3.0F;

 

            if ((double)f < 0.1D)

            {

                return;

            }

 

            if (f > 1.0F)

            {

                f = 1.0F;

            }

 

            EntityArrow entityarrow = new EntityArrow(p_77615_2_, p_77615_3_, f * 2.0F);

 

            if (f == 1.0F)

            {

                entityarrow.setIsCritical(true);

            }

 

            int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_);

 

            if (k > 0)

            {

                entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D);

            }

 

            int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, p_77615_1_);

 

            if (l > 0)

            {

                entityarrow.setKnockbackStrength(l);

            }

 

            if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0)

            {

                entityarrow.setFire(100);

            }

 

            p_77615_1_.damageItem(1, p_77615_3_);

            p_77615_2_.playSoundAtEntity(p_77615_3_, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);

 

            if (flag)

            {

                entityarrow.canBePickedUp = 2;

            }

            else

            {

                p_77615_3_.inventory.consumeInventoryItem(Items.arrow);

            }

 

            if (!p_77615_2_.isRemote)

            {

                p_77615_2_.spawnEntityInWorld(entityarrow);

            }

        }

    }

 

 

    public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_)

    {

        return p_77654_1_;

    }

 

    /**

    * How long it takes to use or consume an item

    */

    public int getMaxItemUseDuration(ItemStack p_77626_1_)

    {

        return 72000;

    }

 

    /**

    * returns the action that specifies what animation to play when the items is being used

    */

    public EnumAction getItemUseAction(ItemStack p_77661_1_)

    {

        return EnumAction.bow;

    }

 

    /**

    * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer

    */

    public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)

    {

        ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);

        MinecraftForge.EVENT_BUS.post(event);

        if (event.isCanceled())

        {

            return event.result;

        }

 

        if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(Items.arrow))

        {

            p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));

        }

 

        return p_77659_1_;

    }

 

    /**

    * Return the enchantability factor of the item, most of the time is based on material.

    */

    public int getItemEnchantability()

    {

        return 1;

    }

 

    @SideOnly(Side.CLIENT)

    public void registerIcons(IIconRegister p_94581_1_)

    {

    System.out.println("###### registerIcons"+this.getIconString());

   

      //this.itemIcon = p_94581_1_.registerIcon(this.getIconString() + "_standby");

    this.itemIcon = p_94581_1_.registerIcon("varamercenaria00" + "_standby");

   

        this.iconArray = new IIcon[bowPullIconNameArray.length];

 

        for (int i = 0; i < this.iconArray.length; ++i)

        {

        //this.iconArray = p_94581_1_.registerIcon(this.getIconString() + "_" + bowPullIconNameArray);

        this.iconArray = p_94581_1_.registerIcon("varamercenaria00" + "_" + bowPullIconNameArray);

            System.out.println("###### "+"varamercenaria00" + "_" + bowPullIconNameArray);

        }

    }

 

    /**

    * used to cycle through icons based on their used duration, i.e. for the bow

    */

    @SideOnly(Side.CLIENT)

    public IIcon getItemIconForUseDuration(int p_94599_1_)

    {

    System.out.println("###### getItemIconForUseDuration"+ p_94599_1_ );

   

        return this.iconArray[p_94599_1_];

    }

}

//##############################################################################

 

 

Posted

Inside your registerIcons you need to register the textures from your mod's assets folder.. add "yourmodid:" before the texture name.

I try my best, so apologies if I said something obviously stupid!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.