diff options
author | Lulonaut <lulonaut@tutanota.de> | 2022-05-01 10:02:45 +0200 |
---|---|---|
committer | Lulonaut <lulonaut@tutanota.de> | 2022-05-01 10:02:45 +0200 |
commit | 82461bbb555a05e9a6d2498740cdcf80f1c9db5f (patch) | |
tree | 8ae7c4ec9bd3920f5c83bee17e8407a9c216e1d2 | |
parent | b2ff2142a5daaaa9f71b405afac440f9008cd649 (diff) | |
download | NotEnoughUpdates-82461bbb555a05e9a6d2498740cdcf80f1c9db5f.tar.gz NotEnoughUpdates-82461bbb555a05e9a6d2498740cdcf80f1c9db5f.tar.bz2 NotEnoughUpdates-82461bbb555a05e9a6d2498740cdcf80f1c9db5f.zip |
different file saving
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java index 7ae247bf..e6220301 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java @@ -1141,7 +1141,9 @@ public class RenderListener { String displayname = lower.getDisplayName().getUnformattedText(); File file = new File( Minecraft.getMinecraft().mcDataDir.getAbsolutePath(), - "config/notenoughupdates/repo/npc/" + displayname.toUpperCase() + ".json" + "config" + File.separator + "notenoughupdates" + + File.separator + "repo" + File.separator + "npc" + File.separator + + displayname.toUpperCase().replace(" ", "_") + ".json" ); newNPC.add("itemid", new JsonPrimitive("minecraft:skull")); newNPC.add("displayname", new JsonPrimitive("ยง9" + displayname + " (NPC)")); @@ -1151,7 +1153,7 @@ public class RenderListener { JsonArray newArray = new JsonArray(); newArray.add(new JsonPrimitive("")); newNPC.add("lore", newArray); - newNPC.add("internalname", new JsonPrimitive(displayname.toUpperCase() + "_NPC")); + newNPC.add("internalname", new JsonPrimitive(displayname.toUpperCase().replace(" ", "_") + "_NPC")); newNPC.add("clickcommand", new JsonPrimitive("viewrecipe")); newNPC.add("modver", new JsonPrimitive(NotEnoughUpdates.VERSION)); newNPC.add("infoType", new JsonPrimitive("WIKI_URL")); |