aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErymanthus[#5074] | (u/)RayDeeUx <51521765+RayDeeUx@users.noreply.github.com>2023-10-03 02:56:32 -0400
committerGitHub <noreply@github.com>2023-10-03 08:56:32 +0200
commit741f8f258b6e865a7ba37c2c199ddba2a7c6cc7c (patch)
tree0823fd0860e934141ca37de55def0bb1296f3943 /src
parent781ea0728f3d79c453019904c53fb7da9a373828 (diff)
downloadskyhanni-741f8f258b6e865a7ba37c2c199ddba2a7c6cc7c.tar.gz
skyhanni-741f8f258b6e865a7ba37c2c199ddba2a7c6cc7c.tar.bz2
skyhanni-741f8f258b6e865a7ba37c2c199ddba2a7c6cc7c.zip
Feature: Highlight Jerries (Jerrypoclaypse) (#528)
Highlight Jerries during the Jerrypoclaypse. #528
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/jerry/HighlightJerries.kt28
3 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index e19e8c2cb..17f7cd838 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -83,6 +83,7 @@ import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowParticleFinder
import at.hannibal2.skyhanni.features.event.diana.GriffinPetWarning
import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare
import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow
+import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries
import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder
import at.hannibal2.skyhanni.features.fame.CityProjectFeatures
import at.hannibal2.skyhanni.features.fishing.FishingHookDisplay
@@ -424,6 +425,7 @@ class SkyHanniMod {
loadModule(StatsTuning())
loadModule(NonGodPotEffectDisplay())
loadModule(SoopyGuessBurrow())
+ loadModule(HighlightJerries())
loadModule(GriffinBurrowHelper)
loadModule(GriffinBurrowParticleFinder())
loadModule(BurrowWarpHelper())
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java
index 0e895f6b3..73861a546 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/EventConfig.java
@@ -311,6 +311,21 @@ public class EventConfig {
public Position pos = new Position(150, 150, false, true);
}
+ @ConfigOption(name = "Mayor Jerry's Jerrypocalypse", desc = "")
+ @Accordion
+ @Expose
+ public MayorJerryConfig jerry = new MayorJerryConfig();
+
+ public static class MayorJerryConfig {
+
+ @Expose
+ @ConfigOption(name = "Highlight Jerries", desc = "Highlights Jerries found from the Jerrypocalypse perk. Highlight color is based on color of the Jerry.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean highlightJerries = true;
+
+ }
+
// comment in if the event is needed again
// @ConfigOption(name = "300þ Anniversary Celebration", desc = "Features for the 300þ year of SkyBlock")
@Accordion
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/HighlightJerries.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/HighlightJerries.kt
new file mode 100644
index 000000000..b850c40ff
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/HighlightJerries.kt
@@ -0,0 +1,28 @@
+package at.hannibal2.skyhanni.features.event.jerry
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
+import at.hannibal2.skyhanni.events.withAlpha
+import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.utils.LorenzColor
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import net.minecraft.entity.passive.EntityVillager
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+class HighlightJerries {
+
+ @SubscribeEvent
+ fun onEntityHealthUpdate(event: EntityMaxHealthUpdateEvent) {
+ if (!SkyHanniMod.feature.event.jerry.highlightJerries) return
+
+ val entity = event.entity
+ val maxHealth = event.maxHealth
+ val listOfLorenzColors = listOf<LorenzColor>(LorenzColor.RED, LorenzColor.RED, LorenzColor.WHITE, LorenzColor.GREEN, LorenzColor.BLUE, LorenzColor.DARK_PURPLE, LorenzColor.GOLD, LorenzColor.LIGHT_PURPLE)
+ //RED RED WHITE LIGHT_PURPLE ARE FALLBACKS IN CASE HYPIXEL ADMINS DO A LITTLE TROLLING
+
+ if (entity is EntityVillager && maxHealth < 7 && maxHealth > 2) {
+ RenderLivingEntityHelper.setEntityColor(entity, listOfLorenzColors[maxHealth].toColor().withAlpha(20))
+ { SkyHanniMod.feature.event.jerry.highlightJerries }
+ }
+ }
+} \ No newline at end of file