aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-31 14:13:58 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-31 14:13:58 +0100
commit624bad4f41f62e58b3c3922eddf54944181d4b6e (patch)
tree2216b4fdd4c80c0b5f242bf48c8959884e7d99c5 /src/main
parent7b1fe6cb0cb2a92e4ea7e6c8126768867c289f3b (diff)
downloadskyhanni-624bad4f41f62e58b3c3922eddf54944181d4b6e.tar.gz
skyhanni-624bad4f41f62e58b3c3922eddf54944181d4b6e.tar.bz2
skyhanni-624bad4f41f62e58b3c3922eddf54944181d4b6e.zip
Hide particles and damage splashes during terracotta phase in dungeon F6/M6.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TerracottaPhaseConfig.java20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt49
4 files changed, 77 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index eb269da5b..8e10ad1aa 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -106,6 +106,7 @@ import at.hannibal2.skyhanni.features.dungeon.DungeonMilestonesDisplay
import at.hannibal2.skyhanni.features.dungeon.DungeonRankTabListColor
import at.hannibal2.skyhanni.features.dungeon.DungeonTeammateOutlines
import at.hannibal2.skyhanni.features.dungeon.HighlightDungeonDeathmite
+import at.hannibal2.skyhanni.features.dungeon.TerracottaPhase
import at.hannibal2.skyhanni.features.event.UniqueGiftingOpportunitiesFeatures
import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper
import at.hannibal2.skyhanni.features.event.diana.DianaProfitTracker
@@ -695,6 +696,7 @@ class SkyHanniMod {
loadModule(GlowingDroppedItems())
loadModule(DungeonTeammateOutlines())
loadModule(DungeonRankTabListColor())
+ loadModule(TerracottaPhase())
loadModule(VolcanoExplosivityDisplay())
loadModule(PlayerChatSymbols())
loadModule(FixNEUHeavyPearls())
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java
index 84cba4de7..0b1eecff6 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/DungeonConfig.java
@@ -86,6 +86,12 @@ public class DungeonConfig {
@Accordion
public LividFinderConfig lividFinder = new LividFinderConfig();
+
+ @Expose
+ @ConfigOption(name = "Terracotta Phase", desc = "")
+ @Accordion
+ public TerracottaPhaseConfig terracottaPhase = new TerracottaPhaseConfig();
+
@Expose
@ConfigOption(name = "Moving Skeleton Skulls", desc = "Highlight Skeleton Skulls when combining into an " +
"orange Skeletor (not useful when combined with feature Hide Skeleton Skull).")
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TerracottaPhaseConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TerracottaPhaseConfig.java
new file mode 100644
index 000000000..b546bc8ec
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dungeon/TerracottaPhaseConfig.java
@@ -0,0 +1,20 @@
+package at.hannibal2.skyhanni.config.features.dungeon;
+
+import at.hannibal2.skyhanni.config.FeatureToggle;
+import com.google.gson.annotations.Expose;
+import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.moulberry.moulconfig.annotations.ConfigOption;
+
+public class TerracottaPhaseConfig {
+
+ @Expose
+ @ConfigOption(name = "Hide Particles", desc = "Hide particles that spawn from terracottas during sadan fight.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean hideParticles = false;
+
+ @Expose
+ @ConfigOption(name = "Hide Damage Splash", desc = "Hide damage splashes during the terracotta phase.")
+ @ConfigEditorBoolean
+ public boolean hideDamageSplash = false;
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
new file mode 100644
index 000000000..9cc992922
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
@@ -0,0 +1,49 @@
+package at.hannibal2.skyhanni.features.dungeon
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.events.ReceiveParticleEvent
+import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import net.minecraft.entity.EntityLivingBase
+import net.minecraftforge.client.event.RenderLivingEvent
+import net.minecraftforge.fml.common.eventhandler.EventPriority
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+class TerracottaPhase {
+ private val config get() = SkyHanniMod.feature.dungeon.terracottaPhase
+
+ private var inTerracottaPhase = false
+
+ @SubscribeEvent
+ fun onChat(event: LorenzChatEvent) {
+ if (!isEnabled()) return
+
+ if (event.message == "§c[BOSS] Sadan§r§f: So you made it all the way here... Now you wish to defy me? Sadan?!") {
+ inTerracottaPhase = true
+ }
+
+ if (event.message == "§c[BOSS] Sadan§r§f: ENOUGH!") {
+ inTerracottaPhase = false
+ }
+ }
+
+ @SubscribeEvent(priority = EventPriority.HIGH)
+ fun onRenderLiving(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
+ if (isActive() && config.hideDamageSplash && DamageIndicatorManager.isDamageSplash(event.entity)) {
+ event.isCanceled = true
+ }
+ }
+
+ @SubscribeEvent
+ fun onReceiveParticle(event: ReceiveParticleEvent) {
+ if (isActive() && config.hideParticles) {
+ event.isCanceled = true
+ }
+ }
+
+ private fun isActive() = isEnabled() && inTerracottaPhase
+
+ private fun isEnabled() =
+ LorenzUtils.inDungeons && DungeonAPI.inBossRoom && DungeonAPI.getCurrentBoss() == DungeonAPI.DungeonFloor.F6
+}