diff --git a/gradle.properties b/gradle.properties index e7a9da4..e1530e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -48,7 +48,7 @@ mod_name=Stack One Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=Apache License 2.0 # The mod version. See https://semver.org/ -mod_version=1.20.1-1.0.4 +mod_version=1.20.1-1.0.5 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/com/laosun/stackone/IgnoreItem.java b/src/main/java/com/laosun/stackone/IgnoreItem.java index 1aacfb6..6359904 100644 --- a/src/main/java/com/laosun/stackone/IgnoreItem.java +++ b/src/main/java/com/laosun/stackone/IgnoreItem.java @@ -25,10 +25,11 @@ public static ArrayList getIgnoreItems() { if (!file.isFile()) { try { if (!file.createNewFile()) { - LOGGER.error("Fail to create file!"); + throw new IOException("Failed to create file!"); } } catch (IOException e) { - LOGGER.error("Fail to create file!"); + LOGGER.error("Failed to create file!"); + e.printStackTrace(); } } char[] a1 = null; @@ -36,7 +37,8 @@ public static ArrayList getIgnoreItems() { a1 = new char[(int) file.length()]; fileReader.read(a1); } catch (IOException e) { - LOGGER.error("Fail to open file!"); + LOGGER.error("Failed to open file!"); + e.printStackTrace(); } Gson gson = new Gson(); @@ -52,7 +54,8 @@ public static ArrayList getIgnoreItems() { } } catch (Exception e) { - LOGGER.error("JSON has syntax error!"); + LOGGER.error("Failed to read JSON file!"); + e.printStackTrace(); } return ignoreItems; } diff --git a/src/main/java/com/laosun/stackone/StackOneMod.java b/src/main/java/com/laosun/stackone/StackOneMod.java index bea623d..f2a7a38 100644 --- a/src/main/java/com/laosun/stackone/StackOneMod.java +++ b/src/main/java/com/laosun/stackone/StackOneMod.java @@ -27,7 +27,7 @@ public StackOneMod() { private void commonSetup(final FMLCommonSetupEvent event) { ArrayList ignoreItems = IgnoreItem.getIgnoreItems(); for (Item i : ForgeRegistries.ITEMS) { - if (ignoreItems.contains(i.builtInRegistryHolder().key().toString())) { + if (ignoreItems.contains(i.builtInRegistryHolder().key().location().toString())) { continue; } Field a;