Posted February 26, 20232 yr Well what the title suggests basically, ive searched everywhere, reading for the answer havent found anything maybe im missing something.The goal is a bar that either shows on the items hud slot when you hold it or at least the tooltip that slowly fills up when you hit enemies.Any ideas or recommendations are aprreciated.
February 27, 20232 yr Create an IItemDecorator and attach it for your item via RegisterItemDecorationsEvent on the mod bud if you want it on the item hud. On the tooltip, you can use RenderTooltipEvent$GatherComponents on the forge event bus to add your specific thing to the tooltip. If you want something custom to render for the tooltip, you can create a new ClientTooltipComponent and register it via RegisterClientTooltipComponentFactoriesEvent on the mod event bus.
May 4, 20232 yr Author A bit of a late answer but im still stuck on this, especially since i took a break from coding.In my weapons class ive created the meter for the gauge(how it should go up and when etc),then used the hover text method but used the console to show me the bar going up everytime i hit sth(worked).I dont get how ill make it render the bar in game (in tooltip) ive made and how it can fill up without me creating a thousand textures and such(i guess i need vector knowledge which i cant find anywhere).As of now ive just made, again inside of the weapons class, a new ClientTooltipComponent but dont know what to do as of it having the png file ive made to show the gauge and how i will make it reference the counter.Heres the GitHub link https://github.com/MissKeisha1/RPGMOD Edited May 4, 20232 yr by Misskeisha
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.