mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-10-26 14:24:07 +00:00
Hax to fix fluid tooltip rendering for forestry & ticon
This commit is contained in:
1 parent
5bfbf250cc
commit
0e3507de0a
2 files changed
+16
-2
No files matched your search
+1
-1
@@ -2,4 +2,4 @@ mc_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
ccl_version=1.1.3.138
|
||||
ccc_version=1.0.7.+
|
||||
mod_version=2.1.0-GTNH-beta10
|
||||
mod_version=2.1.0-GTNH-beta11
|
||||
@@ -242,9 +242,23 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) {
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
for (int i = page * recipesPerPage; i < handler.numRecipes() && i < (page + 1) * recipesPerPage; i++)
|
||||
/*
|
||||
* Several mods try to figure out the relative mouse position for fluid tooltips. This worked fine
|
||||
* when it was a static 166.. however now that we're scaling it this no longer works. Rather than
|
||||
* patching the individual mods (so that we can be as compatible as possible), we'll just fake
|
||||
* the height for their tooltip rendering.
|
||||
*/
|
||||
|
||||
// Begin Hax
|
||||
final int oldHeight = this.height;
|
||||
this.height = 166 + handlerInfo.getHeight() + 18 + (guiTop - 44) * 2;
|
||||
for (int i = page * recipesPerPage; i < handler.numRecipes() && i < (page + 1) * recipesPerPage; i++) {
|
||||
currenttip = handler.handleTooltip(this, currenttip, i);
|
||||
}
|
||||
recipeTabs.handleTooltip(mousex, mousey, currenttip);
|
||||
this.height = oldHeight;
|
||||
// End Hax
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user