aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-06 17:11:16 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-06 17:11:16 +0200
commitc9b4b56db48e935f7c671d0fe0c9c4a0e3edcfdf (patch)
tree15ef0ee9b5405d22a77b0aeef1d725abf6ed5c28 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
parentec46ae2721ce14a31167527e9c7498ec31772bdb (diff)
downloadskyhanni-c9b4b56db48e935f7c671d0fe0c9c4a0e3edcfdf.tar.gz
skyhanni-c9b4b56db48e935f7c671d0fe0c9c4a0e3edcfdf.tar.bz2
skyhanni-c9b4b56db48e935f7c671d0fe0c9c4a0e3edcfdf.zip
new item render background logic and using it for HideNotClickableItems and ItemAbilityCooldown
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 763e4288e..765a075a8 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -22,13 +22,20 @@ object RenderUtils {
val beaconBeam = ResourceLocation("textures/entity/beacon_beam.png")
infix fun Slot.highlight(color: LorenzColor) {
+ highlight(color.toColor())
+ }
+
+ infix fun Slot.highlight(color: Color) {
+ GlStateManager.pushMatrix()
+ GlStateManager.translate(0f, 0f, 110 + Minecraft.getMinecraft().renderItem.zLevel)
Gui.drawRect(
this.xDisplayPosition,
this.yDisplayPosition,
this.xDisplayPosition + 16,
this.yDisplayPosition + 16,
- color.toColor().rgb
+ color.rgb
)
+ GlStateManager.popMatrix()
}
fun RenderWorldLastEvent.drawColor(location: LorenzVec, color: LorenzColor, beacon: Boolean = false) {