Tooltip hotfix for < forge30.0.97.
This commit is contained in:
parent
32612507f1
commit
c3abb83efa
5 changed files with 16 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
org.gradle.jvmargs=-Xmx8G
|
org.gradle.jvmargs=-Xmx8G
|
||||||
version_minecraft=1.16.1
|
version_minecraft=1.16.1
|
||||||
version_forge_minecraft=1.16.1-32.0.97
|
version_forge_minecraft=1.16.1-32.0.98
|
||||||
version_fml_mappings=20200514-1.16
|
version_fml_mappings=20200514-1.16
|
||||||
version_jei=1.16.1:7.0.0.6
|
version_jei=1.16.1:7.0.0.6
|
||||||
version_engineersdecor=1.1.1-b6
|
version_engineersdecor=1.1.1-b6
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||||
"1.16.1": {
|
"1.16.1": {
|
||||||
|
"1.1.1-b6": "[F] Iron Hatch rendering fixed (issue #113, ty KrAzYGEEK32).\n[F] Hot of for UI tooltip crash for versions Forge < 32.0.97.",
|
||||||
"1.1.1-b5": "[M] Transmuted the \"Treated Wood Crafting Table\" to a \"Metal Crafting Table\" to de-duplicate the new Immersive Engineering \"Engineer's Crafting Table\".\n[F] Fixed metal pole culling (issue #109, thx Alsett).",
|
"1.1.1-b5": "[M] Transmuted the \"Treated Wood Crafting Table\" to a \"Metal Crafting Table\" to de-duplicate the new Immersive Engineering \"Engineer's Crafting Table\".\n[F] Fixed metal pole culling (issue #109, thx Alsett).",
|
||||||
"1.1.1-b4": "[F] Fixed Fluid Barrel tooltip text duplicate.\n[F] Fixed IE hard-dependency opt-out.\n[M] Side Table model and shape refined.\n[A] Dense Grit Dirt added.\n[M] Wood textures slightly darker, obsolete textures removed.",
|
"1.1.1-b4": "[F] Fixed Fluid Barrel tooltip text duplicate.\n[F] Fixed IE hard-dependency opt-out.\n[M] Side Table model and shape refined.\n[A] Dense Grit Dirt added.\n[M] Wood textures slightly darker, obsolete textures removed.",
|
||||||
"1.1.1-b3": "[A] Ceiling Edge Light added.\n[A] Iron Bulb Light added.\n[A] Iron Hatch added.\n[A] Fluid Barrel added.\n[M] Gas Concrete texture made slightly darker.",
|
"1.1.1-b3": "[A] Ceiling Edge Light added.\n[A] Iron Bulb Light added.\n[A] Iron Hatch added.\n[A] Fluid Barrel added.\n[M] Gas Concrete texture made slightly darker.",
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
"1.1.1-a1": "[A] Initial port."
|
"1.1.1-a1": "[A] Initial port."
|
||||||
},
|
},
|
||||||
"promos": {
|
"promos": {
|
||||||
"1.16.1-recommended": "1.1.1-b5",
|
"1.16.1-recommended": "1.1.1-b6",
|
||||||
"1.16.1-latest": "1.1.1-b5"
|
"1.16.1-latest": "1.1.1-b6"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,7 +11,8 @@ Mod sources for Minecraft version 1.15.1.
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
~ v1.1.1-b6 [F] Iron Hatch rendering fixed (issue #113, ty KrAzYGEEK32).
|
- v1.1.1-b6 [F] Iron Hatch rendering fixed (issue #113, ty KrAzYGEEK32).
|
||||||
|
[F] Hot of for UI tooltip crash for versions Forge < 32.0.97.
|
||||||
|
|
||||||
- v1.1.1-b5 [M] Transmuted the "Treated Wood Crafting Table" to a "Metal Crafting Table"
|
- v1.1.1-b5 [M] Transmuted the "Treated Wood Crafting Table" to a "Metal Crafting Table"
|
||||||
to de-duplicate the new Immersive Engineering "Engineer's Crafting Table".
|
to de-duplicate the new Immersive Engineering "Engineer's Crafting Table".
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class TooltipDisplay
|
||||||
private int max_deviation = default_max_deviation;
|
private int max_deviation = default_max_deviation;
|
||||||
private int x_last, y_last;
|
private int x_last, y_last;
|
||||||
private long t;
|
private long t;
|
||||||
|
private static boolean had_render_exception = false;
|
||||||
|
|
||||||
public TooltipDisplay()
|
public TooltipDisplay()
|
||||||
{ t = System.currentTimeMillis(); }
|
{ t = System.currentTimeMillis(); }
|
||||||
|
@ -77,6 +78,7 @@ public class TooltipDisplay
|
||||||
|
|
||||||
public <T extends Container> boolean render(MatrixStack mx, final ContainerScreen<T> gui, int x, int y)
|
public <T extends Container> boolean render(MatrixStack mx, final ContainerScreen<T> gui, int x, int y)
|
||||||
{
|
{
|
||||||
|
if(had_render_exception) return false;
|
||||||
if((Math.abs(x-x_last) > max_deviation) || (Math.abs(y-y_last) > max_deviation)) {
|
if((Math.abs(x-x_last) > max_deviation) || (Math.abs(y-y_last) > max_deviation)) {
|
||||||
x_last = x;
|
x_last = x;
|
||||||
y_last = y;
|
y_last = y;
|
||||||
|
@ -89,7 +91,13 @@ public class TooltipDisplay
|
||||||
if((x<tip.x0) || (x>tip.x1) || (y<tip.y0) || (y>tip.y1)) return false;
|
if((x<tip.x0) || (x>tip.x1) || (y<tip.y0) || (y>tip.y1)) return false;
|
||||||
String text = tip.text.getString();
|
String text = tip.text.getString();
|
||||||
if(!text.isEmpty() && (!text.startsWith("block."))) {
|
if(!text.isEmpty() && (!text.startsWith("block."))) {
|
||||||
|
try {
|
||||||
gui.renderToolTip(mx, Collections.singletonList(tip.text), x, y, Minecraft.getInstance().fontRenderer);
|
gui.renderToolTip(mx, Collections.singletonList(tip.text), x, y, Minecraft.getInstance().fontRenderer);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
had_render_exception = true;
|
||||||
|
Auxiliaries.logError("Tooltip rendering disabled due to exception: '" + ex.getMessage() + "'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -18,7 +18,7 @@ logoFile="logo.png"
|
||||||
[[dependencies.engineersdecor]]
|
[[dependencies.engineersdecor]]
|
||||||
modId="forge"
|
modId="forge"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[32.0.75,)"
|
versionRange="[32.0.70,)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue