aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/abilitycooldown/ItemAbilityCooldown.kt15
4 files changed, 21 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java b/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java
index c5776087c..73fb588ef 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Abilities.java
@@ -14,6 +14,11 @@ public class Abilities {
public boolean itemAbilityCooldown = false;
@Expose
+ @ConfigOption(name = "Ability Cooldown Background", desc = "Show the cooldown color of item abilities in the background.")
+ @ConfigEditorBoolean
+ public boolean itemAbilityCooldownBackground = false;
+
+ @Expose
@ConfigOption(name = "Ashfang Freeze", desc = "Show the cooldown how long Ashfang blocks all your abilities.")
@ConfigEditorBoolean
public boolean ashfangFreezeCooldown = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt
index 0741aac5c..ade6ce835 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt
@@ -5,19 +5,19 @@ import net.minecraft.item.ItemStack
abstract class GuiRenderItemEvent : LorenzEvent() {
abstract class RenderOverlayEvent(
- open val fr: FontRenderer,
+ open val fontRenderer: FontRenderer,
open val stack: ItemStack?,
open val x: Int,
open val y: Int,
open val text: String?
) : GuiRenderItemEvent() {
data class Post(
- override val fr: FontRenderer,
+ override val fontRenderer: FontRenderer,
override val stack: ItemStack?,
override val x: Int,
override val y: Int,
override val text: String?
) :
- RenderOverlayEvent(fr, stack, x, y, text)
+ RenderOverlayEvent(fontRenderer, stack, x, y, text)
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
index 6a3f7688c..592d94fad 100644
--- a/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/items/ItemDisplayOverlayFeatures.kt
@@ -27,9 +27,9 @@ class ItemDisplayOverlayFeatures {
GlStateManager.disableLighting()
GlStateManager.disableDepth()
GlStateManager.disableBlend()
- event.fr.drawStringWithShadow(
+ event.fontRenderer.drawStringWithShadow(
stackTip,
- (event.x + 17 - event.fr.getStringWidth(stackTip)).toFloat(),
+ (event.x + 17 - event.fontRenderer.getStringWidth(stackTip)).toFloat(),
(event.y + 9).toFloat(),
16777215
)
diff --git a/src/main/java/at/hannibal2/skyhanni/items/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/items/abilitycooldown/ItemAbilityCooldown.kt
index e744f7ca6..f3d2cdd3f 100644
--- a/src/main/java/at/hannibal2/skyhanni/items/abilitycooldown/ItemAbilityCooldown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/items/abilitycooldown/ItemAbilityCooldown.kt
@@ -111,15 +111,22 @@ class ItemAbilityCooldown {
val color = itemText.color
stackTip = color.getChatColor() + itemText.text
- item.background = color.addOpacity(120).rgb
+ if (SkyHanniMod.feature.abilities.itemAbilityCooldownBackground) {
+ var opacity = 130
+ if (color == LorenzColor.GREEN) {
+ opacity = 80
+ }
+ item.background = color.addOpacity(opacity).rgb
+ }
if (stackTip.isNotEmpty()) {
GlStateManager.disableLighting()
GlStateManager.disableDepth()
GlStateManager.disableBlend()
- event.fr.drawStringWithShadow(
+ //TODO add option to change the size
+ event.fontRenderer.drawStringWithShadow(
stackTip,
- (event.x + 17 - event.fr.getStringWidth(stackTip)).toFloat(),
+ (event.x + 17 - event.fontRenderer.getStringWidth(stackTip)).toFloat(),
(event.y + 9).toFloat(),
16777215
)
@@ -144,7 +151,7 @@ class ItemAbilityCooldown {
val cooldownInSeconds: Long,
vararg val itemNames: String,
var lastClick: Long = 0L,
- val actionBarDetection: Boolean = true
+ val actionBarDetection: Boolean = true,
) {
ATOMSPLIT("Soulcry", 4, "Atomsplit Katana", "Vorpal Katana", "Voidedge Katana"),
WITHER_IMPACT("Wither Impact", 5, "Hyperion", "Scylla", "Valkyrie", "Astrea", actionBarDetection = false),