Jump to content

How do i create a hover tooltip in my gui 1.16.5


Teerth

Recommended Posts

Hey i created a this code it works but on one button like if i add more of these it does not show only

Quote

 

if (mouseX > guiLeft + 71 && mouseX < guiLeft + 71 + 16 && mouseY > guiTop + 53 && mouseY < guiTop + 53 + 16) {

            this.renderTooltip(ms, new StringTextComponent("\u00A7e" + "TEXT" + "TEXT"), mouseX, mouseY);

 

and if you have any other code pls let me know i need urgent help

Link to comment
Share on other sites

if (mouseX > guiLeft + 71 && mouseX < guiLeft + 71 + 16 && mouseY > guiTop + 71 && mouseY < guiTop + 71 + 16) { this.renderTooltip(ms, new StringTextComponent("\u00A7e" + "Turn-Right" + "Text"), mouseX, mouseY);

see this works but when i copy paste same code under it and change position it does not work 

and this is other code which does not work only i got this from a server 

this.addButton(new ImageButton(this.guiLeft + 71, this.guiTop + 53, 16, 16, 0, 0, 0, new ResourceLocation("car_example:textures/circle1.png"), 16, 16, (p_2130901) -> { CarExampleMod.PACKET_HANDLER.sendToServer(new Diamond2Gui.ButtonPressedMessage(0, x, y, z)); Diamond2Gui.handleButtonAction(entity, 0, x, y, z); }, new StringTextComponent("Hello, this is a tooltip")));

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hiya! I've just been using FTB Launcher there since I was having problems with Curseforge and now I've run into bother with this as well. It began out of nowhere but whenever I was trying to load AllTheMods 8 one day it didn't work so I deleted the config for some broken mods; usually works for me. Nothing worked so I uninstalled the whole instance, and I've been redownloading it again and again trying different things - Allocating more ram, reinstalling Java, the works.   It'd be greatly appreciated if anyone were able to help me, every couple of weeks I have to tear these modpacks apart to actually get them to work and it's so annoying.   Here's the log if that helps? The guy on the other post said to post the whole debug but I couldn't get it: https://ibb.co/5G03gX4 Sorry that it's linked it wouldn't let me copy and paste, the newest debug will be below too:   [09Jun2023 15:31:10.155] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, SillyDillyXoxo, --version, 1.19.2-forge-43.2.11, --gameDir, D:\ftb\c4f3a60c-f9e7-49d8-970a-17b98825359e, --assetsDir, C:\Users\Dylan Lunney\AppData\Local\.ftba\bin\assets, --assetIndex, 1.19, --uuid, cef43407-3d1e-48f8-96a5-ec6b2b30a9a9, --accessToken, ????????, --clientId, ${clientid}, --xuid, ${auth_xuid}, --userType, msa, --versionType, release, --width, 1720, --height, 840, --launchTarget, forgeclient, --fml.forgeVersion, 43.2.11, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [09Jun2023 15:31:10.160] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.4 by Eclipse Adoptium; OS Windows 10 arch amd64 version 10.0 [09Jun2023 15:31:10.180] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,forgegametestserverdev,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness,forgegametestserveruserdev] [09Jun2023 15:31:10.190] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp] [09Jun2023 15:31:10.203] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner] [09Jun2023 15:31:10.211] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services        
    • Are you tired of “modern” skyblock servers that are nothing like the original? Are you looking for a skyblock server that is just like the original skyblock servers used to be? So was I, but I couldn't find one, so, I decided to make my own. Many modern servers have mutated the Skyblock game mode to the point where it is unrecognizable compared to the original. We are seeking to create a space where those who loved classic Skyblock can enjoy the original game mode. Even if you have not played classic Skyblock before, we encourage you to join our community to learn about what the original mode was like and why there was so much excitement around it. Server Description Classic Skies is designed just like the original skyblock servers but in the modern version, 1.19.4. There is a server shop where you can buy some of the items that you can’t obtain naturally with in-game money, as well as a plugin that allows you to set up your own shops on your island, causing a mostly player-run economy. Classic Skies’ goal is to bring back the nostalgic and classic feel of the original Skyblock as much as possible. We have a dedicated staff team and an owner with years of experience running small to medium-sized Minecraft servers. Classic Skies is a small server with a tight-knit community, and we are looking for new members to enjoy our server. Additionally, we are dedicated to delivering a lag-free, fair, and safe experience for every member of the community. Server Info Server IP: play.classicskies.com Supports Java & Bedrock Edition Bedrock Port: 19132 Game Version: 1.19.4 Discord: https://discord.gg/n7qXHnhksA
    • https://gist.github.com/Jayv6/7e39a9c1b3eb10b0d5d76442718d80e0
    • Hey Harry007! I recently created a server called Classic Skies. It is an amazing skyblock server. Here is the information: Are you tired of “modern” skyblock servers that are nothing like the original? Are you looking for a skyblock server that is just like the original skyblock servers used to be? So was I, but I couldn't find one, so, I decided to make my own.   Many modern servers have mutated the Skyblock game mode to the point where it is unrecognizable compared to the original. We are seeking to create a space where those who loved classic Skyblock can enjoy the original game mode. Even if you have not played classic Skyblock before, we encourage you to join our community to learn about what the original mode was like and why there was so much excitement around it.   Server Description Classic Skies is designed just like the original skyblock servers but in the modern version, 1.19.4. There is a server shop where you can buy some of the items that you can’t obtain naturally with in-game money, as well as a plugin that allows you to set up your own shops on your island, causing a mostly player-run economy. Classic Skies’ goal is to bring back the nostalgic and classic feel of the original Skyblock as much as possible. We have a dedicated staff team and an owner with years of experience running small to medium-sized Minecraft servers. Classic Skies is a small server with a tight-knit community, and we are looking for new members to enjoy our server. Additionally, we are dedicated to delivering a lag-free, fair, and safe experience for every member of the community.   Server Info Server IP: play.classicskies.com Supports Java & Bedrock Edition Bedrock Port: 19132 Game Version: 1.19.4 Discord: https://discord.gg/n7qXHnhksA
    • I am trying to override or disable some vanilla recipes, as part of my mod. All of the methods that I have seen online, so far, do not work. So far, I have tried: Creating a JSON file in the "data/minecraft/recipes" folder, that has air as the ingredient and a barrier as the result This only works for crafting table recipes adding a smelting recipe this way works as intended Editing the ordering to AFTER in the forge dependency inside the "mods.toml" file Found an older post about using the FurnaceRecipe class, that no longer exists From: here So, what is required to disable a vanilla smelting recipe? I know some may say to not do this, but part of the progression of my mod kind of requires disabling some of the furnace recipes. Also, it seems that smelting recipes don't technically have to have the same filename as the block used, r as the result. When overriding crafting recipes, just adding the edited/removed recipe file in the minecraft data folder, under the same name as the original recipe.  Edit: the crafting recipes seem to be cached between worlds? I created a new world and the edited crafting recipes works, but it doesn't work in an already made world?
  • Topics

×
×
  • Create New...

Important Information

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