Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Making a "Hold Shift For Info" function for item tooltips [UNSOLVED] [1.7.10]


TheEpicTekkit
 Share

Recommended Posts

Hello, I am trying to figure out how to make a 'Hold Shift for Info" function for a tooltip, but I cant seem to find any info about this on the internet, so my last resource is here... I already have the tooltip done, but I only want it to show when I press shift.

 

Thanks for the help.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Link to comment
Share on other sites

Okay, so I do want the info button to be the sneak key, so if the player changes it, that is the new button to hold, so I don't want to do the keyboard.isKeyDown thing.

 

But I have a problem; player.isSneaking() doesn't work.... I am using the EntityPlayer in the addInformation() method. I am assuming that the isSneaking() method doesn't work in inventories, because, I guess that it was never intended to be used in guis.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Link to comment
Share on other sites

There is no keyBindSneak method in gemeRegistry.... after I type the "." and eclipse brings up a list of methods, if I press k, it disappears, so there isn't even a method that starts with k.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Okay, is it secure and can the code be copied to another file for usage or it has to be that exact file?
    • And if i run ./gradlew genEclipseRuns they are error:   * What went wrong: Could not resolve all files for configuration ':runtimeClasspathCopy'. > Could not find net.minecraftforge:forge:1.16.5-36.2.5_mapped_official_1.16.5.   Searched in the following locations:     - file:/Users/kikismine/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.2.5_mapped_official_1.16.5/forge-1.16.5-36.2.5_mapped_official_1.16.5.pom     - file:/Users/kikismine/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.2.5_mapped_official_1.16.5/forge-1.16.5-36.2.5_mapped_official_1.16.5.jar   Required by:       project :   * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.   * Get more help at https://help.gradle.org   Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.   You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.   See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings   BUILD FAILED in 51s kikismine@Krystof-MacBook-Air KikisMod %
    • The text doesn't show. What did I do wrong this time? public class GuiHandler { String text = "Hello world!"; @SubscribeEvent public void onRenderGui(RenderGameOverlayEvent.Post event) { OverlayRegistry.registerOverlayTop("hello", new IIngameOverlay() { @Override public void render(ForgeIngameGui gui, PoseStack mStack, float partialTicks, int width, int height) { drawString(mStack, Minecraft.getInstance().font, text, width / 2, height / 2, Integer.parseInt("33AA66", 16)); } }); } }
    • New Pastebin stay errors https://pastebin.com/7dUT78cj
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.