aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java
diff options
context:
space:
mode:
authorLulonaut <67191924+Lulonaut@users.noreply.github.com>2022-05-17 18:02:09 +0200
committerGitHub <noreply@github.com>2022-05-17 18:02:09 +0200
commitc697563d4d8d596d65dbc91d82d7c0a9f10a25d4 (patch)
tree9e91a883b464817c74d1a5634e3de8ff9c2fa574 /src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java
parent1076a433bb6bb57c4d9ab73342d8f8b21c9749fc (diff)
downloadnotenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.tar.gz
notenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.tar.bz2
notenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.zip
Improve item editor (#137)
* Intellij insurance * Only parse inventory in essence guide * Save mobs with whitespaces correctly * npe when currentProfile is null * ??? * 🧌 * 🤡 * Fixed crash with spamming remove enchant in /neuec - thank you lulo for free pr to commit to * added command to toggle repo autoupdating * i am so good at patch note * i used the github web editor for this * i double checked the brackets and everything * don't even look at it (this is only ran with dev mode enabled) * more readable Co-authored-by: NopoTheGamer <noahogno@gmail.com> Co-authored-by: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java
index e5028146..b7d4a321 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/RecipeGenerator.java
@@ -21,7 +21,12 @@ import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Keyboard;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -231,6 +236,7 @@ public class RecipeGenerator {
Damage: 3s
}*/
public boolean saveRecipes(String relevantItem, List<NeuRecipe> recipes) throws IOException {
+ relevantItem = relevantItem.replace(" ", "_");
JsonObject outputJson = neu.manager.readJsonDefaultDir(relevantItem + ".json");
if (outputJson == null) return false;
outputJson.addProperty("clickcommand", "viewrecipe");