diff --git a/gradle.properties b/gradle.properties index 394a45a..4da0fa1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.daemon=false org.gradle.jvmargs=-Xmx8G 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_jei=1.16.1:7.0.0.6 version_engineersdecor=1.1.1-b6 diff --git a/meta/update.json b/meta/update.json index b2571aa..ea5ea4b 100644 --- a/meta/update.json +++ b/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "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-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.", @@ -9,7 +10,7 @@ "1.1.1-a1": "[A] Initial port." }, "promos": { - "1.16.1-recommended": "1.1.1-b5", - "1.16.1-latest": "1.1.1-b5" + "1.16.1-recommended": "1.1.1-b6", + "1.16.1-latest": "1.1.1-b6" } } \ No newline at end of file diff --git a/readme.md b/readme.md index 90d3254..efd9c01 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,8 @@ Mod sources for Minecraft version 1.15.1. ## 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" to de-duplicate the new Immersive Engineering "Engineer's Crafting Table". diff --git a/src/main/java/wile/engineersdecor/libmc/detail/TooltipDisplay.java b/src/main/java/wile/engineersdecor/libmc/detail/TooltipDisplay.java index 15bb535..3e812ac 100644 --- a/src/main/java/wile/engineersdecor/libmc/detail/TooltipDisplay.java +++ b/src/main/java/wile/engineersdecor/libmc/detail/TooltipDisplay.java @@ -53,6 +53,7 @@ public class TooltipDisplay private int max_deviation = default_max_deviation; private int x_last, y_last; private long t; + private static boolean had_render_exception = false; public TooltipDisplay() { t = System.currentTimeMillis(); } @@ -77,6 +78,7 @@ public class TooltipDisplay public boolean render(MatrixStack mx, final ContainerScreen 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)) { x_last = x; y_last = y; @@ -89,7 +91,13 @@ public class TooltipDisplay if((xtip.x1) || (ytip.y1)) return false; String text = tip.text.getString(); if(!text.isEmpty() && (!text.startsWith("block."))) { - gui.renderToolTip(mx, Collections.singletonList(tip.text), x, y, Minecraft.getInstance().fontRenderer); + try { + 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; }) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 89b8022..4cf8512 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -18,7 +18,7 @@ logoFile="logo.png" [[dependencies.engineersdecor]] modId="forge" mandatory=true - versionRange="[32.0.75,)" + versionRange="[32.0.70,)" ordering="NONE" side="BOTH"