aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoringle <inglettronald@gmail.com>2022-10-10 16:42:42 -0500
committeringle <inglettronald@gmail.com>2022-10-10 16:42:42 -0500
commit488edc7b76782fe5742848d7f732e5c3a120365a (patch)
tree16025539b087ab095f8a6fbbf67c03a2fe7f2527
parent9df33639c328bac68aa40109b1fa3a6eb069c9c5 (diff)
downloadDulkirMod-488edc7b76782fe5742848d7f732e5c3a120365a.tar.gz
DulkirMod-488edc7b76782fe5742848d7f732e5c3a120365a.tar.bz2
DulkirMod-488edc7b76782fe5742848d7f732e5c3a120365a.zip
+ hide nametags for arachne
-rw-r--r--src/main/kotlin/dulkirmod/config/Config.kt8
-rw-r--r--src/main/kotlin/dulkirmod/features/NametagCleaner.kt7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/config/Config.kt b/src/main/kotlin/dulkirmod/config/Config.kt
index b554bbb..f38257c 100644
--- a/src/main/kotlin/dulkirmod/config/Config.kt
+++ b/src/main/kotlin/dulkirmod/config/Config.kt
@@ -380,6 +380,14 @@ object Config : Vigilant(File("./config/dulkirmod/config.toml"), "DulkirMod", so
fun demoVolume() {
DulkirMod.mc.thePlayer.playSound("mob.ghast.scream", 1f * Config.bestiaryNotifVol, 1f)
}
+
+ @Property(
+ type = PropertyType.SWITCH,
+ name = "Hide Arachne Loot Nametags",
+ description = "Useful when killing a lot of them",
+ category = "Bestiary"
+ )
+ var hideArachneTags = false
fun init() {
initialize()
addDependency("customMessage", "throttleNotifier")
diff --git a/src/main/kotlin/dulkirmod/features/NametagCleaner.kt b/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
index 6d588c2..f198251 100644
--- a/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
+++ b/src/main/kotlin/dulkirmod/features/NametagCleaner.kt
@@ -21,6 +21,13 @@ object NametagCleaner {
mc.theWorld.removeEntity(event.entity)
}
}
+
+ if (config.hideArachneTags) {
+ val name = stripColorCodes(event.entity.customNameTag)
+ if (name.contains("Luxurious Spool") || name.contains("String") || name.contains("Arachne Fragment")){
+ mc.theWorld.removeEntity(event.entity)
+ }
+ }
}
}
}