diff options
Diffstat (limited to 'src/main')
-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") } |