Jump to content

Recommended Posts

Posted

I'm trying to make a gun-type item, well...a bow that doesn't pull back. So what do I take out of my bow class to remove pullback?

 

And for textures, it keeps saying it cant find textures that are in their proper locations.

 

I have

 public static final String[] bowPullIconNameArray = new String[] {"SlimeCannon", "bow_pull_1", "bow_pull_2"};
    @SideOnly(Side.CLIENT)
    private Icon[] iconArray;

and

 

@SideOnly(Side.CLIENT)

private Icon[] Texture = new Icon[4];
public void updateIcons(IconRegister iconRegister)

{
        
                 iconIndex = iconRegister.registerIcon("mymodname:" + this.getUnlocalizedName().substring(5) + "_0");
                 for (int N = 0; N < 4; N++)
                 {
                                 this.Texture[N] = iconRegister.registerIcon("mymodename:" + this.getUnlocalizedName().substring(5) + "_" + N);
                                 
                 }
}
public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
                 if(player.getItemInUse() == null) return this.iconIndex;
                 int Pulling = stack.getMaxItemUseDuration() - useRemaining;
                 if (Pulling >= 18)
                 {
                                 return Texture[3];
                 }
                 else if (Pulling > 13)
                 {
                                 return Texture[2];
                 }
                 else if (Pulling > 0)
                 {
                                 return Texture[1];
                 }                       
                 return Texture[0];
                 }

 

 

Modding and "Photoshopping."

Posted

I'm trying to make a gun-type item, well...a bow that doesn't pull back. So what do I take out of my bow class to remove pullback?

 

And for textures, it keeps saying it cant find textures that are in their proper locations.

 

I have

 public static final String[] bowPullIconNameArray = new String[] {"SlimeCannon", "bow_pull_1", "bow_pull_2"};
    @SideOnly(Side.CLIENT)
    private Icon[] iconArray;

and

 

@SideOnly(Side.CLIENT)

private Icon[] Texture = new Icon[4];
public void updateIcons(IconRegister iconRegister)

{
        
                 iconIndex = iconRegister.registerIcon("mymodname:" + this.getUnlocalizedName().substring(5) + "_0");
                 for (int N = 0; N < 4; N++)
                 {
                                 this.Texture[N] = iconRegister.registerIcon("mymodename:" + this.getUnlocalizedName().substring(5) + "_" + N);
                                 
                 }
}
public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
                 if(player.getItemInUse() == null) return this.iconIndex;
                 int Pulling = stack.getMaxItemUseDuration() - useRemaining;
                 if (Pulling >= 18)
                 {
                                 return Texture[3];
                 }
                 else if (Pulling > 13)
                 {
                                 return Texture[2];
                 }
                 else if (Pulling > 0)
                 {
                                 return Texture[1];
                 }                       
                 return Texture[0];
                 }

 

 

Modding and "Photoshopping."

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



×
×
  • Create New...

Important Information

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