aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorHiZe_ <superhize@hotmail.com>2023-07-11 00:44:26 +0200
committerGitHub <noreply@github.com>2023-07-11 00:44:26 +0200
commit3ef7fc57adcfb0a4692034f4d7075110f5719ce0 (patch)
treed9d6d161203686babe0d310f77462acb697677e8 /src/main/java/at/hannibal2
parentdf6054cc8923ea93105dc94c683b8b95318a98f4 (diff)
downloadskyhanni-3ef7fc57adcfb0a4692034f4d7075110f5719ce0.tar.gz
skyhanni-3ef7fc57adcfb0a4692034f4d7075110f5719ce0.tar.bz2
skyhanni-3ef7fc57adcfb0a4692034f4d7075110f5719ce0.zip
Merge pull request #304
* blobbercysts highlight * moved to Colosseum area config * fixed import * fixes * added cansee before enabling depth * removed depth
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java20
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt55
3 files changed, 69 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index c16efdb36..7e2408424 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -63,6 +63,7 @@ import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputat
import at.hannibal2.skyhanni.features.rift.RiftTimer
import at.hannibal2.skyhanni.features.rift.ShowMotesNpcSellPrice
import at.hannibal2.skyhanni.features.rift.area.RiftLarva
+import at.hannibal2.skyhanni.features.rift.area.colosseum.BlobbercystsHighlight
import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftAgaricusCap
import at.hannibal2.skyhanni.features.rift.area.dreadfarm.VoltHighlighter
import at.hannibal2.skyhanni.features.rift.area.livingcave.LivingMetalSuitProgress
@@ -339,6 +340,7 @@ class SkyHanniMod {
loadModule(HighlightMiningCommissionMobs())
loadModule(ShowMotesNpcSellPrice())
loadModule(LivingMetalSuitProgress())
+ loadModule(BlobbercystsHighlight())
init()
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java
index 702791dc0..175a60c02 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java
@@ -469,14 +469,18 @@ public class RiftConfig {
}
}
-// @Expose
-// @ConfigOption(name = "Colosseum", desc = "")
-// @Accordion
-// public ColosseumConfig colosseumConfig = new ColosseumConfig();
-//
-// public static class ColosseumConfig {
-//
-// }
+ @Expose
+ @ConfigOption(name = "Colosseum", desc = "")
+ @Accordion
+ public ColosseumConfig colosseumConfig = new ColosseumConfig();
+
+ public static class ColosseumConfig {
+
+ @Expose
+ @ConfigOption(name = "Highlight Blobbercysts", desc = "Highlight Blobbercysts in Bacte fight.")
+ @ConfigEditorBoolean
+ public boolean highlightBlobbercysts = true;
+ }
// @Expose
// @ConfigOption(name = "Stillgore Chateau", desc = "")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt
new file mode 100644
index 000000000..8c8debba1
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt
@@ -0,0 +1,55 @@
+package at.hannibal2.skyhanni.features.rift.area.colosseum
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.events.withAlpha
+import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI
+import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.utils.LocationUtils
+import at.hannibal2.skyhanni.utils.LocationUtils.canSee
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.getLorenzVec
+import net.minecraft.client.Minecraft
+import net.minecraft.client.entity.EntityOtherPlayerMP
+import net.minecraft.client.renderer.GlStateManager
+import net.minecraftforge.client.event.RenderLivingEvent
+import net.minecraftforge.event.entity.living.LivingDeathEvent
+import net.minecraftforge.event.world.WorldEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.awt.Color
+
+class BlobbercystsHighlight {
+
+ private val config get() = SkyHanniMod.feature.rift.area.colosseumConfig
+ private val entityList = mutableListOf<EntityOtherPlayerMP>()
+ private val blobberName = "Blobbercyst "
+
+ @SubscribeEvent
+ fun onTick(event: LorenzTickEvent) {
+ if (!isEnabled()) return
+ if (!event.isMod(5)) return
+ Minecraft.getMinecraft().theWorld.loadedEntityList.filterIsInstance<EntityOtherPlayerMP>().forEach {
+ if (it.name == blobberName) {
+ RenderLivingEntityHelper.setEntityColor(it, Color.RED.withAlpha(80)) { isEnabled() }
+ RenderLivingEntityHelper.setNoHurtTime(it) { isEnabled() }
+ entityList.add(it)
+ }
+ }
+ }
+
+ @SubscribeEvent
+ fun onWorldChange(event: WorldEvent.Load) {
+ if (!isEnabled()) return
+ entityList.clear()
+ }
+
+ @SubscribeEvent
+ fun onLivingDeath(event: LivingDeathEvent) {
+ if (!isEnabled()) return
+ if (entityList.contains(event.entity)) {
+ entityList.remove(event.entity)
+ }
+ }
+
+ fun isEnabled() = RiftAPI.inRift() && config.highlightBlobbercysts && LorenzUtils.skyBlockArea == "Colosseum"
+} \ No newline at end of file