Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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.

  • 2 months later...
  • 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 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.