diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-06 17:11:16 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-06 17:11:16 +0200 |
commit | c9b4b56db48e935f7c671d0fe0c9c4a0e3edcfdf (patch) | |
tree | 15ef0ee9b5405d22a77b0aeef1d725abf6ed5c28 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | |
parent | ec46ae2721ce14a31167527e9c7498ec31772bdb (diff) | |
download | skyhanni-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.kt | 9 |
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) { |