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")));