Posted May 4, 20169 yr I want to add additional information to the icon of an item - such as an electric bow which has a durability bar, energy bar (in blue) and a number showing the number of arrows left in the players inventory (which is colored if the next arrow used is a potion effect, or glows if the next arrow used is a glowing arrow). That is an extreme example, but demonstrates what I am after. How can I do this?
May 4, 20169 yr Item#showDurabilityBar Item#getDurabilityForDisplay Item#isDamageable Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 5, 20169 yr I will add that if you're wanting the second blue durability bar, EnderIO's Source is available for download on GitHub. http://p455w0rd.net/images/forumsignature.png[/img]
May 5, 20169 yr Author Item#showDurabilityBar Item#getDurabilityForDisplay Item#isDamageable I know about those - but that is for the green durability bar. This is about adding a second durability bar above this. And some numbers above that, which are colored depending on non-tool specific information.
May 5, 20169 yr EnderIO does simlar things (p455w0rd already said), but it uses ASM. So, there's no way (besides ASMing RenderItem.renderItemOverlayIntoGUI ) to do this. @Forge: why forge hasn't added any hooks for this? Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
May 5, 20169 yr Author EnderIO does simlar things (p455w0rd already said), but it uses ASM. So, there's no way (besides ASMing RenderItem.renderItemOverlayIntoGUI ) to do this. @Forge: why forge hasn't added any hooks for this? Well, EnderIO is for 1.7.10. That is two major versions (and an overhaul of rendering) ago.
May 5, 20169 yr Well, EnderIO is for 1.7.10. That is two major versions (and an overhaul of rendering) ago. EnderIO has an experimental 1.8.9 version, the source of which is available on GitHub. I think the proper way to do this is with a custom IModel and ItemOverrideList , like Forge's ModelDynBucket . For a limited number of variants (e.g. a single bar with 10 steps), you can do what RFTools does: manually create the textures and then use them with standard models. Edit: Added a missing word. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 5, 20169 yr Author Well, EnderIO is for 1.7.10. That is two major versions (and an overhaul of rendering) ago. EnderIO has an experimental 1.8.9 version, the source of which is available on GitHub. I think the proper way to do this is with a custom IModel and ItemOverrideList , like Forge's ModelDynBucket . For a limited number of variants (e.g. a single bar with 10 steps), you can do what RFTools does: manually create the textures and then use them standard models. The bar is the easy part (relatively), what about numbers (like an arrow counter on a bow)?
May 5, 20169 yr The bar is the easy part (relatively), what about numbers (like an arrow counter on a bow)? You'll need an IModel and ItemOverrideList as I said in my previous post. Probably an ICustomModelLoader as well. You'll also need a texture for each digit so you can generate the BakedQuad s for the number. I don't know that much about the rendering system, so I can't help you much more than this. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 5, 20169 yr Author The bar is the easy part (relatively), what about numbers (like an arrow counter on a bow)? You'll need an IModel and ItemOverrideList as I said in my previous post. Probably an ICustomModelLoader as well. You'll also need a texture for each digit so you can generate the BakedQuad s for the number. I don't know that much about the rendering system, so I can't help you much more than this. Hmm. I was hoping that there would be a way around doing this, at least when it comes to adding extra bars/numbers.
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.