diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-10 12:11:57 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-10 12:11:57 +0200 |
commit | 1159de0e664adeb3f474d2ef20766bdfd2b2c72d (patch) | |
tree | 2f6ae203680677c037482702cdf38b13a551279a /src/main/java/at/hannibal2 | |
parent | 2e6660878df6054da93a0f96b857bf4cae31ef23 (diff) | |
download | skyhanni-1159de0e664adeb3f474d2ef20766bdfd2b2c72d.tar.gz skyhanni-1159de0e664adeb3f474d2ef20766bdfd2b2c72d.tar.bz2 skyhanni-1159de0e664adeb3f474d2ef20766bdfd2b2c72d.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java index cd04d353e..110e37510 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -456,7 +456,10 @@ public class MiscConfig { public boolean trapperTalkCooldown = true; @Expose - @ConfigOption(name = "Trapper Cooldown GUI", desc = "Show the cooldown on screen in an overlay (intended for abiphone users)") + @ConfigOption( + name = "Trapper Cooldown GUI", + desc = "Show the cooldown on screen in an overlay (intended for abiphone users)." + ) @ConfigEditorBoolean public boolean trapperCooldownGui = false; diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 779bb2d3b..7b0482efd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -179,10 +179,8 @@ class TrevorFeatures { Minecraft.getMinecraft().theWorld.getEntityByID(backupTrapperID) if (entityTrapper is EntityLivingBase) { if (config.trapperTalkCooldown) { - RenderLivingEntityHelper.setEntityColor( - entityTrapper, - currentStatus.color - ) { config.trapperTalkCooldown } + RenderLivingEntityHelper.setEntityColor(entityTrapper, currentStatus.color) + { config.trapperTalkCooldown } entityTrapper.getLorenzVec().let { if (it.distanceToPlayer() < 15) { event.drawString(it.add(0.0, 2.23, 0.0), currentLabel) @@ -245,10 +243,14 @@ class TrevorFeatures { currentLabel = "§2Ready" } - enum class TrapperStatus(val color: Int, val colorCode: String) { - READY(LorenzColor.DARK_GREEN.toColor().withAlpha(75), "§2"), - WAITING(LorenzColor.DARK_AQUA.toColor().withAlpha(75), "§3"), - ACTIVE(LorenzColor.DARK_RED.toColor().withAlpha(75), "§4"), + enum class TrapperStatus(baseColor: LorenzColor) { + READY(LorenzColor.DARK_GREEN), + WAITING(LorenzColor.DARK_AQUA), + ACTIVE(LorenzColor.DARK_RED), + ; + + val color = baseColor.toColor().withAlpha(75) + val colorCode = baseColor.getChatColor() } private fun onFarmingIsland() = |