diff options
author | inglettronald <inglettronald@gmail.com> | 2023-04-02 15:39:30 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-04-02 15:39:30 -0500 |
commit | 5ccdf51feaa03dbb718903b633950accdfc90ac8 (patch) | |
tree | 0edad8aaf0f22de9ece9c138b35b02365b4e766b /src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt | |
parent | 661f5cc3b6fb8870480adf2df512c80263ba09a1 (diff) | |
download | DulkirMod-5ccdf51feaa03dbb718903b633950accdfc90ac8.tar.gz DulkirMod-5ccdf51feaa03dbb718903b633950accdfc90ac8.tar.bz2 DulkirMod-5ccdf51feaa03dbb718903b633950accdfc90ac8.zip |
Should only trigger when holding hyp now, might break w/ neucustomize
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt index f2c8c0e..9f1ca22 100644 --- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt +++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt @@ -26,8 +26,14 @@ fun brokenHypeNotif() { // get info about held item if (stack.hasTagCompound()) { val tag: NBTTagCompound = stack.tagCompound - if (tag.hasKey("ExtraAttributes", 10)) { + if (tag.hasKey("ExtraAttributes", 10) && tag.hasKey("display", 10)) { val ea: NBTTagCompound = tag.getCompoundTag("ExtraAttributes") + val dis: NBTTagCompound = tag.getCompoundTag("display") + + if (dis.hasKey("Name")) + if(!dis.getString("Name").contains("(Hyperion|Astraea|Scylla|Valkyrie)".toRegex())) + return + if (ea.hasKey("id", 8)) { id = ea.getString("id") } |