Posted April 24, 201312 yr 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."
April 24, 201312 yr Author 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.