From 15c95c1e5479e0284874c554b58554e7e1b4cd91 Mon Sep 17 00:00:00 2001 From: glowredman <35727266+glowredman@users.noreply.github.com> Date: Sun, 17 Jan 2021 17:32:41 +0100 Subject: [PATCH] Fix NPE for non-OreDict entries --- build.gradle | 11 ++--------- .../wherearetheores/nei/WATORecipeHandler.java | 3 +-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 1129d62..c168c74 100644 --- a/build.gradle +++ b/build.gradle @@ -20,8 +20,8 @@ apply plugin: 'forge' sourceCompatibility = 1.8 targetCompatibility = 1.8 -version = "1.0" -group= "glowredman.wherearetheores" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +version = "1.0.1" +group= "glowredman.wherearetheores" archivesBaseName = "WhereAreTheOres" minecraft { @@ -46,19 +46,12 @@ dependencies { processResources { - // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version - - // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' - - // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } - - // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } diff --git a/src/main/java/glowredman/wherearetheores/nei/WATORecipeHandler.java b/src/main/java/glowredman/wherearetheores/nei/WATORecipeHandler.java index 2a38f88..e35976b 100644 --- a/src/main/java/glowredman/wherearetheores/nei/WATORecipeHandler.java +++ b/src/main/java/glowredman/wherearetheores/nei/WATORecipeHandler.java @@ -60,8 +60,7 @@ public void loadCraftingRecipes(ItemStack result) { // decode ore: List decodedOres = new ArrayList(); if (key.startsWith("[")) { - key.replaceFirst("[", ""); - for (String item : key.split(";")) { + for (String item : key.substring(1).split(";")) { decodedOres.add(WATO.findItem(item)); } } else {