From 5ccdf51feaa03dbb718903b633950accdfc90ac8 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Sun, 2 Apr 2023 15:39:30 -0500 Subject: Should only trigger when holding hyp now, might break w/ neucustomize --- src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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") } -- cgit