diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2021-11-28 23:10:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-28 23:10:03 +0100 |
commit | 1e1ac8f1fa096b2acffb3065e4ba7583a00e1385 (patch) | |
tree | 9fd6feb17cf1d7204d4f049912a2d558d1a2fc42 /src/main/java | |
parent | 18be3d697a2b2dd4bebea48ef476053d3b4b72f3 (diff) | |
download | NotEnoughUpdates-1e1ac8f1fa096b2acffb3065e4ba7583a00e1385.tar.gz NotEnoughUpdates-1e1ac8f1fa096b2acffb3065e4ba7583a00e1385.tar.bz2 NotEnoughUpdates-1e1ac8f1fa096b2acffb3065e4ba7583a00e1385.zip |
Readme changes and custom rune system (#26)
* Readme changes
* Fixed </a> thingy
* runes
* Added check
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index f9c5b01b..01e97c75 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -708,7 +708,7 @@ public class NEUManager { } } } - if ("ENCHANTED_BOOK".equals(internalname)) { + if ("ENCHANTED_BOOK".equals(internalname) && ea.hasKey("enchantments", 10)) { NBTTagCompound enchants = ea.getCompoundTag("enchantments"); for (String enchname : enchants.getKeySet()) { @@ -716,6 +716,14 @@ public class NEUManager { break; } } + if ("RUNE".equals(internalname) && ea.hasKey("runes", 10)) { + NBTTagCompound rune = ea.getCompoundTag("runes"); + + for (String runename : rune.getKeySet()) { + internalname = runename.toUpperCase() + "_RUNE" + ";" + rune.getInteger(runename); + break; + } + } } return internalname; |