<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Kotlin] New Notifications]]></title><description><![CDATA[<pre><code>package net.ccbluex.liquidbounce.ui.client.hud.element.elements
import net.ccbluex.liquidbounce.LiquidBounce
import net.ccbluex.liquidbounce.utils.timer.MSTimer
import net.ccbluex.liquidbounce.LiquidBounce.hud
import net.ccbluex.liquidbounce.ui.client.hud.designer.GuiHudDesigner
import net.ccbluex.liquidbounce.ui.client.hud.element.Border
import net.ccbluex.liquidbounce.ui.client.hud.element.Element
import net.ccbluex.liquidbounce.ui.client.hud.element.ElementInfo
import net.ccbluex.liquidbounce.ui.client.hud.element.Side
import net.ccbluex.liquidbounce.utils.render.AnimationUtils

import net.minecraft.client.renderer.GlStateManager

import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.ClientUtils
import net.ccbluex.liquidbounce.utils.render.RenderUtils
import net.minecraft.util.ResourceLocation
import java.awt.Color
@ElementInfo(name = "Notifications", single = true)
class Notifications(x: Double = 0.0, y: Double = 30.0, scale: Float = 1F,
                    side: Side = Side(Side.Horizontal.RIGHT, Side.Vertical.DOWN)) : Element(x, y, scale, side) {

    /**
     * Example notification for CustomHUD designer
     */
    private val exampleNotification = Notification("Example Notification", Notification.Type.INFO)

    /**
     * Draw element
     */
    override fun drawElement(): Border? {
        var animationY = 30F
        val notifications = mutableListOf&lt;Notification&gt;()
        for(i in hud.notifications)
            notifications.add(i)
        for(i in notifications)
            if(mc.currentScreen !is GuiHudDesigner)
            i.drawNotification(animationY).also { animationY += 32 }
        else
            exampleNotification.drawNotification(animationY)
        if (mc.currentScreen is GuiHudDesigner) {
            if (!hud.notifications.contains(exampleNotification))
                hud.addNotification(exampleNotification)

            exampleNotification.fadeState = Notification.FadeState.STAY
            exampleNotification.x = exampleNotification.textLength + 8F

            return Border(-98F, -58F, 0F, -30F)
        }

        return null
    }

}
class Notification(message : String,type : Type) {
    var x = 0f
    var textLength = 0
    private var stay = 0f
    private var fadeStep = 0f
    var fadeState = FadeState.IN
    private var stayTimer = MSTimer()
    private var firstY = 0f
    private var animeTime: Long = 0
    private var message: String = ""
    private var type: Type
    init {
        this.message = message
        this.type = type
        this.firstY = 1919F
        this.stayTimer.reset()
        this.textLength = Fonts.font35.getStringWidth(message)
    }
    enum class Type {
        SUCCESS,
        INFO,
        WARNING,
        ERROR
    }

    enum class FadeState {
        IN,STAY,OUT,END
    }

    fun drawNotification(animationY: Float) {
        val delta = RenderUtils.deltaTime
        val width = textLength.toFloat() + 8.0f
        var y = animationY
        if (firstY == 1919.0F) {
            firstY = y
        }
        if (firstY &gt; y) {
            val cacheY = firstY - (firstY - y) * ((System.currentTimeMillis() - animeTime).toFloat() / 300.0f)
            if (cacheY &lt;= y) {
                firstY = cacheY
            }
            y = cacheY
        } else {
            firstY = y
            animeTime = System.currentTimeMillis()
        }
        RenderUtils.drawRect(-x + 8 + textLength, -y, -x - 5, -28F - y, Color(255,255,255).rgb)
        RenderUtils.drawRect(-x -1, -y, -x - 5, -28F - y, when(type) {
            Type.SUCCESS -&gt; Color(80, 255, 80).rgb
            Type.ERROR -&gt; Color(255, 80, 80).rgb
            Type.INFO -&gt; Color(80, 80, 255).rgb
            Type.WARNING -&gt; Color(255, 255, 80).rgb
        })
        var replacedMessage = message
        replacedMessage = replacedMessage.replace("Enabled ", "")
        replacedMessage = replacedMessage.replace("Disabled ", "")
        if(message.contains("Enabled", true) || message.contains("Disabled", true)) {
            val stringBuilder = StringBuilder()
            stringBuilder.append("$replacedMessage Module")
            replacedMessage = stringBuilder.toString()
        }
        Fonts.font35.drawString(replacedMessage, -x + 2, -11F - y, Color(110, 110, 110).rgb)
        Fonts.font40.drawString(if(message.contains("Enabled")) "Enabled" else if(message.contains("Disabled")) "Disabled" else type.toString(), -x + 2, -23F - y,
            if(!message.contains("Enabled") &amp;&amp; !message.contains("Disabled"))
                when(type) {
                Type.SUCCESS -&gt; Color(80, 255, 80).rgb
                Type.ERROR -&gt; Color(255, 80, 80).rgb
                Type.INFO -&gt; Color(80, 80, 255).rgb
                Type.WARNING -&gt; Color(255, 255, 0).rgb
                }
            else
                if(message.contains("Enabled"))
                    Color(80, 255, 80).rgb
                else
                    Color(255, 80, 80).rgb
        )
        GlStateManager.resetColor()
        when (fadeState) {
            FadeState.IN -&gt; {
                if (x &lt; width) {
                    x = AnimationUtils.easeOut(fadeStep, width) * width
                    fadeStep += delta / 4F
                }
                if (x &gt;= width) {
                    fadeState = FadeState.STAY
                    x = width
                    fadeStep = width
                }

                stay = 60F
            }

            FadeState.STAY -&gt; {
                if (stay &gt; 0) {
                    stay = 0F
                    stayTimer.reset()
                }
                if (stayTimer.hasTimePassed(1500L))
                    fadeState = FadeState.OUT
            }

            FadeState.OUT -&gt; if (x &gt; 0) {
                x = AnimationUtils.easeOut(fadeStep, width) * width
                fadeStep -= delta / 4F
            } else
                fadeState = FadeState.END

            FadeState.END -&gt; hud.removeNotification(this)
        }
    }
}

</code></pre>
]]></description><link>https://forum.liquidbounce.net/topic/1925/kotlin-new-notifications</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 19:18:28 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/1925.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Apr 2021 12:36:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 09 Jul 2021 10:49:16 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1625827678119-316a38e6-92e3-4464-aa7d-01bca333252f-image.png" alt="316a38e6-92e3-4464-aa7d-01bca333252f-image.png" class=" img-fluid img-markdown" /><br />
<img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title=":thinking_face:" alt="🤔" /></p>
]]></description><link>https://forum.liquidbounce.net/post/20314</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/20314</guid><dc:creator><![CDATA[tpzimin]]></dc:creator><pubDate>Fri, 09 Jul 2021 10:49:16 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sun, 06 Jun 2021 15:34:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sed_oik" aria-label="Profile: sed_oik">@<bdi>sed_oik</bdi></a> edit src, and no you can't</p>
]]></description><link>https://forum.liquidbounce.net/post/18610</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/18610</guid><dc:creator><![CDATA[skiddermaster412]]></dc:creator><pubDate>Sun, 06 Jun 2021 15:34:19 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sun, 06 Jun 2021 15:33:32 GMT]]></title><description><![CDATA[<p dir="auto">how can you use it?</p>
]]></description><link>https://forum.liquidbounce.net/post/18609</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/18609</guid><dc:creator><![CDATA[sed_oik]]></dc:creator><pubDate>Sun, 06 Jun 2021 15:33:32 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Thu, 27 May 2021 05:26:01 GMT]]></title><description><![CDATA[<p dir="auto">wtf turbo cope????</p>
]]></description><link>https://forum.liquidbounce.net/post/17986</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17986</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 27 May 2021 05:26:01 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Thu, 27 May 2021 04:09:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/enderman202020" aria-label="Profile: enderman202020">@<bdi>enderman202020</bdi></a> either stop being arrogant or use a proper translator<br />
or try to think for yourself but ymmv</p>
]]></description><link>https://forum.liquidbounce.net/post/17984</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17984</guid><dc:creator><![CDATA[quadro]]></dc:creator><pubDate>Thu, 27 May 2021 04:09:31 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Thu, 27 May 2021 03:56:55 GMT]]></title><description><![CDATA[<p dir="auto">brain stopped working</p>
]]></description><link>https://forum.liquidbounce.net/post/17983</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17983</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 27 May 2021 03:56:55 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Thu, 27 May 2021 00:01:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/enderman202020" aria-label="Profile: enderman202020">@<bdi>enderman202020</bdi></a> i just-<br />
wha- what<br />
i dont understand</p>
]]></description><link>https://forum.liquidbounce.net/post/17975</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17975</guid><dc:creator><![CDATA[quadro]]></dc:creator><pubDate>Thu, 27 May 2021 00:01:45 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Tue, 25 May 2021 19:52:02 GMT]]></title><description><![CDATA[<p dir="auto">export to javaskript</p>
]]></description><link>https://forum.liquidbounce.net/post/17946</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17946</guid><dc:creator><![CDATA[Sigmaclient info]]></dc:creator><pubDate>Tue, 25 May 2021 19:52:02 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sun, 18 Apr 2021 11:20:17 GMT]]></title><description><![CDATA[<p dir="auto">cant code^</p>
]]></description><link>https://forum.liquidbounce.net/post/14807</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14807</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 18 Apr 2021 11:20:17 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sun, 18 Apr 2021 11:19:16 GMT]]></title><description><![CDATA[<p dir="auto">how do i use it?</p>
]]></description><link>https://forum.liquidbounce.net/post/14806</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14806</guid><dc:creator><![CDATA[Patrik Stettner]]></dc:creator><pubDate>Sun, 18 Apr 2021 11:19:16 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sun, 18 Apr 2021 05:40:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gking" aria-label="Profile: gking">@<bdi>gking</bdi></a> oh my god</p>
]]></description><link>https://forum.liquidbounce.net/post/14799</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14799</guid><dc:creator><![CDATA[GameBoy]]></dc:creator><pubDate>Sun, 18 Apr 2021 05:40:17 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sat, 17 Apr 2021 10:59:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hktb" aria-label="Profile: hktb">@<bdi>hktb</bdi></a> crossversion moment</p>
<pre><code class="language-kotlin">classProvider.isGuiHudDesigner(mc.currentScreen)
</code></pre>
]]></description><link>https://forum.liquidbounce.net/post/14752</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14752</guid><dc:creator><![CDATA[exit scammed]]></dc:creator><pubDate>Sat, 17 Apr 2021 10:59:27 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sat, 17 Apr 2021 10:37:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hktb" aria-label="Profile: hktb">@<bdi>hktb</bdi></a> b73复制b72码子，没谁了</p>
]]></description><link>https://forum.liquidbounce.net/post/14751</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14751</guid><dc:creator><![CDATA[wangtian297]]></dc:creator><pubDate>Sat, 17 Apr 2021 10:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sat, 17 Apr 2021 09:17:54 GMT]]></title><description><![CDATA[<p dir="auto">ok skidit</p>
]]></description><link>https://forum.liquidbounce.net/post/14723</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14723</guid><dc:creator><![CDATA[Gking]]></dc:creator><pubDate>Sat, 17 Apr 2021 09:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Sat, 17 Apr 2021 05:09:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gameboy" aria-label="Profile: gameboy">@<bdi>gameboy</bdi></a> how to fix?<br />
<img src="/assets/uploads/files/1618636117632-d2fbd5c0-ea3b-4127-8ce6-eacd9f59dd14-image.png" alt="d2fbd5c0-ea3b-4127-8ce6-eacd9f59dd14-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.liquidbounce.net/post/14715</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14715</guid><dc:creator><![CDATA[HKTB]]></dc:creator><pubDate>Sat, 17 Apr 2021 05:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 16 Apr 2021 21:51:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gameboy" aria-label="Profile: gameboy">@<bdi>gameboy</bdi></a> best notifications But not enough time before disappearing notifications</p>
]]></description><link>https://forum.liquidbounce.net/post/14711</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14711</guid><dc:creator><![CDATA[Димон 100к]]></dc:creator><pubDate>Fri, 16 Apr 2021 21:51:43 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 16 Apr 2021 08:58:42 GMT]]></title><description><![CDATA[<p dir="auto">@codd3r-cheat-minecraft Liquid bounce source</p>
]]></description><link>https://forum.liquidbounce.net/post/14658</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14658</guid><dc:creator><![CDATA[Plumer Man]]></dc:creator><pubDate>Fri, 16 Apr 2021 08:58:42 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 16 Apr 2021 08:51:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gameboy" aria-label="Profile: gameboy">@<bdi>gameboy</bdi></a> And how to put them I do not understand this</p>
]]></description><link>https://forum.liquidbounce.net/post/14657</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14657</guid><dc:creator><![CDATA[Boneshadow]]></dc:creator><pubDate>Fri, 16 Apr 2021 08:51:19 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 16 Apr 2021 02:38:34 GMT]]></title><description><![CDATA[<p dir="auto">im not event have liquidsense</p>
]]></description><link>https://forum.liquidbounce.net/post/14645</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14645</guid><dc:creator><![CDATA[Litely]]></dc:creator><pubDate>Fri, 16 Apr 2021 02:38:34 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Fri, 16 Apr 2021 01:49:51 GMT]]></title><description><![CDATA[<p dir="auto">@idkmyname said in <a href="/post/14614">[Kotlin] New Notifications</a>:</p>
<blockquote>
<p dir="auto">cant code^</p>
<p dir="auto">worked fine with me</p>
</blockquote>
<p dir="auto">epic <s>liquidsense paster</s> coder</p>
]]></description><link>https://forum.liquidbounce.net/post/14642</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14642</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 16 Apr 2021 01:49:51 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] New Notifications on Thu, 15 Apr 2021 14:28:18 GMT]]></title><description><![CDATA[<p dir="auto">cant code^</p>
<p dir="auto">worked fine with me</p>
]]></description><link>https://forum.liquidbounce.net/post/14614</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/14614</guid><dc:creator><![CDATA[Litely]]></dc:creator><pubDate>Thu, 15 Apr 2021 14:28:18 GMT</pubDate></item></channel></rss>