mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
This commit is contained in:
1 parent
929c7b7a0b
commit
5125775992
1 file changed
+5
-4
@@ -172,10 +172,11 @@ public class ClientHooks
|
||||
Minecraft.getInstance().getTextureManager().bind(iconSheet);
|
||||
AbstractGui.blit(mStack, x + width - 18, y + 10, 16, 16, 0, idx, 16, 16, 256, 256);
|
||||
|
||||
if(relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26)
|
||||
//TODO using StringTextComponent here is a hack, we should be using TranslationTextComponents.
|
||||
gui.setToolTip(Collections.singletonList(new StringTextComponent(tooltip)));
|
||||
|
||||
if(relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26) {
|
||||
//this is not the most proper way to do it,
|
||||
//but works best here and has the least maintenance overhead
|
||||
gui.setToolTip(Arrays.stream(tooltip.split("\n")).map(StringTextComponent::new).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
public static String fixDescription(String description)
|
||||
|
||||
Reference in new issue
Block a user