From 8a768873860bf0e81267cc0905c79dc35856246c Mon Sep 17 00:00:00 2001 From: coolGi2007 Date: Sun, 2 Jan 2022 03:49:50 +0000 Subject: [PATCH] Updated core and fixed config crash --- .../java/com/seibel/lod/common/wrappers/config/ConfigGui.java | 4 +++- core | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java index 133f4f986..cb1a331f6 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java @@ -413,6 +413,8 @@ public abstract class ConfigGui if (!reload) loadFromFile(); + // addRenderableWidget in 1.17 and over + // addButton in 1.16 and below this.addRenderableWidget(new Button(this.width / 2 - 154, this.height - 28, 150, 20, CommonComponents.GUI_CANCEL, button -> { loadFromFile(); Objects.requireNonNull(minecraft).setScreen(parent); @@ -513,7 +515,7 @@ public abstract class ConfigGui String key = translationPrefix + (info.category.isEmpty() ? "" : info.category + ".") + info.field.getName() + ".@tooltip"; if (info.error != null && text.equals(name)) renderTooltip(matrices, (Component) info.error.getValue(), mouseX, mouseY); - else if (I18n.exists(key) && text.equals(name)) { + else if (I18n.exists(key) && (text == null ? false : text.equals(name))) { List list = new ArrayList<>(); for (String str : I18n.get(key).split("\n")) list.add(new TextComponent(str)); diff --git a/core b/core index 975c24c8a..219ad9c45 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 975c24c8a9650dcfa9bd817d4c803c108ff1123a +Subproject commit 219ad9c45ac48b705e7a034d74383b636b2c9006