diff options
Diffstat (limited to 'src')
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 |