From 4869e0d049a4951bfd0b4ff3ff6634668db2f628 Mon Sep 17 00:00:00 2001 From: Kogepan229 Date: Sun, 18 May 2025 00:11:14 +0900 Subject: [PATCH] Catch invalid link --- .../glodblock/github/common/tile/TileLevelMaintainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java b/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java index d02e3e36..8127b9dd 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java @@ -588,7 +588,11 @@ public class TileLevelMaintainer extends AENetworkTile enable = tag.getBoolean("enable"); state = LevelState.values()[tag.getInteger("state")]; if (tag.hasKey("link")) { + try { this.link = AEApi.instance().storage().loadCraftingLink(tag.getCompoundTag("link"), this.tile); + } catch (Exception ignored) { + this.link = null; + } } job = null; } @@ -600,7 +604,11 @@ public class TileLevelMaintainer extends AENetworkTile enable = tag.getBoolean("enable"); state = LevelState.values()[tag.getInteger("state")]; if (tag.hasKey("link")) { + try { this.link = AEApi.instance().storage().loadCraftingLink(tag.getCompoundTag("link"), this.tile); + } catch (Exception ignored) { + this.link = null; + } } }