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

So I have a device in my mod that adds special properties to vanilla tools. I also want it to show a custom tooltip on the items, so you can see what properties the item has. I know there's a method in Item you can override to add information, but I can't do that for vanilla items. Do I need to add information to the ItemStacks? I can't seem to find a method in there to do that.

I'm a plugin developer, and I just started modding. Don't blame me for doing things wrong, Forge is not the same as Bukkit.

  • Author

According to the Forge event list page: "Fired to check whether the advanced information on item tooltips is being shown, toggled by F3+H". I want my tooltip to show all the time, not just toggled by F3+H, similair to the information on potions or weapons showing their effects/damage.

I'm a plugin developer, and I just started modding. Don't blame me for doing things wrong, Forge is not the same as Bukkit.

PRE-Edit:

Wow ninja'd twice

 

ItemTooltipEvent

(extends PlayerEvent, LivingEvent, EntityEvent) Fired to check whether the advanced information on item tooltips is being shown, toggled by F3+H

 

I use this for my mod to display "Stats" since I deal quite a bit with vanilla items, and if they are the correct extended class, other modded items too.

 

You can probably still get away with using the itemStacks NBT data to store your values, and read them when that event fires.

 

it's suggested to use Capabilities now for ItemStacks, which I had a grand time trying to figure out how to sync them correctly from server to client. I chose a more clunky way, another person went ahead and got some IContainerListeners working which works 100% better than what I did. Choonster posted that thread in mine as well.

According to the Forge event list page: "Fired to check whether the advanced information on item tooltips is being shown, toggled by F3+H". I want my tooltip to show all the time, not just toggled by F3+H, similair to the information on potions or weapons showing their effects/damage.

 

That page is incorrect, the event is always fired when an item tooltip is displayed; regardless of the advanced tooltip setting.

 

The doc comments in the event class explain 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.

  • Author

According to the Forge event list page: "Fired to check whether the advanced information on item tooltips is being shown, toggled by F3+H". I want my tooltip to show all the time, not just toggled by F3+H, similair to the information on potions or weapons showing their effects/damage.

 

That page is incorrect, the event is always fired when an item tooltip is displayed; regardless of the advanced tooltip setting.

 

The doc comments in the event class explain this.

 

Allright, let me test that, would be awesome if that's true

I'm a plugin developer, and I just started modding. Don't blame me for doing things wrong, Forge is not the same as Bukkit.

  • Author

According to the Forge event list page: "Fired to check whether the advanced information on item tooltips is being shown, toggled by F3+H". I want my tooltip to show all the time, not just toggled by F3+H, similair to the information on potions or weapons showing their effects/damage.

 

That page is incorrect, the event is always fired when an item tooltip is displayed; regardless of the advanced tooltip setting.

 

The doc comments in the event class explain this.

 

Oh, that worked, thanks a lot for the help!

I'm a plugin developer, and I just started modding. Don't blame me for doing things wrong, Forge is not the same as Bukkit.

  • 1 year later...

I assume this is still the case for 1.12.2, could someone link me the forge doc for this. Or at least an example and where this should be located.

Thanks.

1 hour ago, Blu_Nighttime said:

I assume this is still the case for 1.12.2, could someone link me the forge doc for this. Or at least an example and where this should be located.

Thanks.

This topic is almost 2 years old. Please don’t comment on old threads. I don’t know where the docs for the event.

In the event just check it the item is the one you want to add the tooltip to and add the tooltip if it is. If you have any questions please make your own new topic 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.