CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Larissa
    • Profile
    • Following 4
    • Followers 29
    • Topics 15
    • Posts 57
    • Best 37
    • Controversial 0
    • Groups 0

    Larissa

    @Larissa

    a cute girl

    300
    Reputation
    333
    Profile views
    57
    Posts
    29
    Followers
    4
    Following
    Joined Last Online
    Location China Age 16

    Larissa Unfollow Follow

    Best posts made by Larissa

    • A Notification Theme like IntelliJ IDEA.

      this is a notification like idea.i will give you icons and codes.

      
      import net.ccbluex.liquidbounce.LiquidBounce
      import net.ccbluex.liquidbounce.utils.timer.MSTimer
      import net.ccbluex.liquidbounce.LiquidBounce.hud
      import net.ccbluex.liquidbounce.value.BoolValue
      import net.ccbluex.liquidbounce.value.FloatValue
      import net.ccbluex.liquidbounce.value.ListValue
      import net.ccbluex.liquidbounce.value.IntegerValue
      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.ccbluex.liquidbounce.utils.render.BlurUtils
      import net.ccbluex.liquidbounce.utils.render.Stencil
      import net.minecraft.client.gui.Gui
      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
      
      import org.lwjgl.opengl.GL11
      
      @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) {
      
          private val smoothYTransition = BoolValue("Smooth-YTransition", true)
          private val blurValue = BoolValue("Blur", false)
          private val blurStrength = FloatValue("Blur-Strength", 0F, 0F, 30F)
          private val styleValue = ListValue("Style", arrayOf("Compact", "New", "IntelliJ IDEA LOL"), "Compact")
          private val newAnimValue = BoolValue("UseNewAnim", true)
          private val animationSpeed = FloatValue("Anim-Speed", 0.5F, 0.01F, 1F, { newAnimValue.get() })
          private val bgRedValue = IntegerValue("Background-Red", 0, 0, 255)
          private val bgGreenValue = IntegerValue("Background-Red", 0, 0, 255)
          private val bgBlueValue = IntegerValue("Background-Red", 0, 0, 255)
          private val bgAlphaValue = IntegerValue("Background-Alpha", 190, 0, 255)
      
          /**
           * Example notification for CustomHUD designer
           */
          private val exampleNotification = Notification("Example Notification", Notification.Type.INFO)
      
          /**
           * Draw element
           */
          override fun drawElement(): Border? {
              val bgColor = Color(bgRedValue.get(), bgGreenValue.get(), bgBlueValue.get(), bgAlphaValue.get())
              var animationY = 30F
              val notifications = mutableListOf()
      
              for (i in hud.notifications)
                  notifications.add(i)
              
              if (mc.currentScreen !is GuiHudDesigner || !notifications.isEmpty()) 
                  for(i in notifications)
                      i.drawNotification(
                      animationY, 
                      smoothYTransition.get(), 
                      newAnimValue.get(), 
                      animationSpeed.get(), 
                      bgColor, side, 
                      styleValue.get(), 
                      blurValue.get(), 
                      blurStrength.get(), 
                      renderX.toFloat(), 
                      renderY.toFloat())
                          .also { animationY += when (styleValue.get().toLowerCase()) {
                              "compact" -> 20
                              "full" -> 30
                              else -> 30
                          } * if (side.vertical == Side.Vertical.DOWN) 1F else -1F}
              else
                  exampleNotification.drawNotification(
                      animationY, 
                      smoothYTransition.get(), 
                      newAnimValue.get(), 
                      animationSpeed.get(), 
                      bgColor, side, 
                      styleValue.get(), 
                      blurValue.get(), 
                      blurStrength.get(), 
                      renderX.toFloat(), 
                      renderY.toFloat())
      
              if (mc.currentScreen is GuiHudDesigner) {
                  exampleNotification.fadeState = Notification.FadeState.STAY
                  //exampleNotification.stayTimer.reset()
                  exampleNotification.x = exampleNotification.textLength + 8F
                  if (exampleNotification.stayTimer.hasTimePassed(exampleNotification.displayTime)) 
                      exampleNotification.stayTimer.reset()
      
                  return if (styleValue.get().equals("compact", true)) Border(-102F, -48F, 0F, -30F) else Border(-130F, -58F, 0F, -30F)
              }
      
              return null
          }
      
      }
      class Notification(message : String, type : Type, displayLength: Long) {
          private val notifyDir = "liquidbounce+/notif/"
          private val imgSuccess = ResourceLocation("${notifyDir}checkmark.png")
          private val imgError = ResourceLocation("${notifyDir}error.png")
          private val imgWarning = ResourceLocation("${notifyDir}warning.png")
          private val imgInfo = ResourceLocation("${notifyDir}info.png")
      
          var x = 0f
          var textLength = 0
          private var stay = 0f
          private var fadeStep = 0f
          var fadeState = FadeState.IN
          var displayTime : Long = 0L
          var stayTimer = MSTimer()
          private var firstY = 0f
          private var message: String = ""
          private var type: Type
          init {
              this.message = message
              this.type = type
              this.displayTime = displayLength
              this.firstY = 19190F
              this.stayTimer.reset()
              this.textLength = Fonts.minecraftFont.getStringWidth(message)
          }
      
          constructor(message: String, type: Type) : this(message, type, 2000L)
      
          constructor(message: String) : this(message, Type.INFO, 500L)
      
          constructor(message: String, displayLength: Long) : this(message, Type.INFO, displayLength)
      
          enum class Type {
              SUCCESS,
              INFO,
              WARNING,
              ERROR
          }
      
          enum class FadeState {
              IN,STAY,OUT,END
          }
      
          fun drawNotification(animationY: Float, smooth: Boolean, newAnim: Boolean, animSpeed: Float, backgroundColor: Color, side: Side, style: String, blur: Boolean, strength: Float, originalX: Float, originalY: Float) {
              val delta = RenderUtils.deltaTime
              val width = textLength.toFloat() + 8.0f
              
              if (smooth) {
                  if (firstY == 19190.0F) {
                      firstY = animationY
                  }
                  firstY += (animationY - firstY) * 0.25F
              } else {
                  firstY = animationY
              }
      
              var y = firstY
      
              when (style.toLowerCase()) {
                  "compact" -> {
                      GlStateManager.resetColor()
                      if (blur) {
                          GL11.glTranslatef(-originalX, -originalY, 0F)
                          GL11.glPushMatrix()
                          BlurUtils.blurAreaRounded(originalX + -x - 5F, originalY + -18F - y, originalX + -x + 8F + textLength, originalY + -y, 3F, strength)
                          GL11.glPopMatrix()
                          GL11.glTranslatef(originalX, originalY, 0F)
                      } 
      
                      RenderUtils.customRounded(-x + 8F + textLength, -y, -x - 2F, -18F - y, 0F, 3F, 3F, 0F, backgroundColor.rgb)
                      RenderUtils.customRounded(-x - 2F, -y, -x - 5F, -18F - y, 3F, 0F, 0F, 3F, when(type) {
                              Type.SUCCESS -> Color(80, 255, 80).rgb
                              Type.ERROR -> Color(255, 80, 80).rgb
                              Type.INFO -> Color(255, 255, 255).rgb
                              Type.WARNING -> Color(255, 255, 0).rgb
                          })  
      
                      GlStateManager.resetColor()
                      Fonts.minecraftFont.drawStringWithShadow(message, -x + 3, -13F - y, -1)
                  }
      
                  "new" -> {
                      val dist = (x + 1 + 26F) - (x - 8 - textLength)
                      val kek = -x - 1 - 20F
      
                      val toolong = dist * if (stayTimer.hasTimePassed(displayTime)) 0F else ((displayTime - (System.currentTimeMillis() - stayTimer.time)).toFloat() / displayTime.toFloat())
      
                      GlStateManager.resetColor()
                      if (blur) {
                          GL11.glTranslatef(-originalX, -originalY, 0F)
                          GL11.glPushMatrix()
                          BlurUtils.blurAreaRounded(originalX + kek, originalY + -28F - y, originalX + -x + 8 + textLength, originalY + -y, 3F, strength)
                          GL11.glPopMatrix()
                          GL11.glTranslatef(originalX, originalY, 0F)
                      } 
      
                      Stencil.write(true)
                      RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, backgroundColor.rgb)
                      Stencil.erase(true)
      
                      GlStateManager.resetColor()
                      if (fadeState == FadeState.STAY && !stayTimer.hasTimePassed(displayTime))
                          RenderUtils.newDrawRect(kek, -y, kek + toolong, -1.5F - y, when(type) {
                              Type.SUCCESS -> Color(80, 255, 80, 255).rgb
                              Type.ERROR -> Color(255, 80, 80, 255).rgb
                              Type.INFO -> Color(127,174,210).rgb
                              Type.WARNING -> Color(255, 255, 0).rgb
                          })
                      else if (fadeState == FadeState.IN)
                          RenderUtils.newDrawRect(kek, -y, kek + dist, -1.5F - y, when(type) {
                              Type.SUCCESS -> Color(80, 255, 80, 255).rgb
                              Type.ERROR -> Color(255, 80, 80, 255).rgb
                              Type.INFO -> Color(127,174,210).rgb
                              Type.WARNING -> Color(255, 255, 0).rgb
                          })
      
                      Stencil.dispose()
      
                      GL11.glPushMatrix()
                      GlStateManager.disableAlpha()
                      GlStateManager.resetColor()
                      GL11.glColor4f(1F, 1F, 1F, 1F)
                      RenderUtils.drawImage2(when (type) {
                          Type.SUCCESS -> imgSuccess
                          Type.ERROR -> imgError
                          Type.WARNING -> imgWarning
                          Type.INFO -> imgInfo
                      }, kek +2, -24F - y, 18, 18)
                      GlStateManager.enableAlpha()
                      GL11.glPopMatrix()
      
                      Fonts.minecraftFont.drawStringWithShadow(message, -x + 2, -18F - y, -1)
                  }
      
                  "intellij idea lol" -> {
                      val dist = (x + 1 + 26F) - (x - 8 - textLength)
                      val kek = -x - 1 - 20F
      
                      GlStateManager.resetColor()
                      if (blur) {
                          GL11.glTranslatef(-originalX, -originalY, 0F)
                          GL11.glPushMatrix()
                          BlurUtils.blurAreaRounded(originalX + kek, originalY + -28F - y, originalX + -x + 8 + textLength, originalY + -y, 3F, strength)
                          GL11.glPopMatrix()
                          GL11.glTranslatef(originalX, originalY, 0F)
                      }
      
                      Stencil.write(true)
      
                      if (type == Type.ERROR) {
                          RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(115,69,75).rgb)
                          RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(89,61,65).rgb)
                          Fonts.minecraftFont.drawStringWithShadow("IDE Error:", -x - 4, -25F - y, Color(249,130,108).rgb)
                      }
                      if (type == Type.INFO) {
                          RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(70,94,115).rgb)
                          RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(61,72,87).rgb)
                          Fonts.minecraftFont.drawStringWithShadow("IDE Information:", -x - 4, -25F - y, Color(119,145,147).rgb)
                      }
                      if (type == Type.SUCCESS) {
                          RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(67,104,67).rgb)
                          RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(55,78,55).rgb)
                          Fonts.minecraftFont.drawStringWithShadow("IDE Success:", -x - 4, -25F - y, Color(10,142,2).rgb)
                      }
                      if (type == Type.WARNING) {
                          RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(103,103,63).rgb)
                          RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(80,80,57).rgb)
                          Fonts.minecraftFont.drawStringWithShadow("IDE Warning:", -x - 4, -25F - y, Color(175,163,0).rgb)
                      }
      
                      Stencil.erase(true)
      
                      GlStateManager.resetColor()
      
                      Stencil.dispose()
      
                      GL11.glPushMatrix()
                      GlStateManager.disableAlpha()
                      GlStateManager.resetColor()
                      GL11.glColor4f(1F, 1F, 1F, 1F)
                      RenderUtils.drawImage2(when (type) {
                          Type.SUCCESS -> imgSuccess
                          Type.ERROR -> imgError
                          Type.WARNING -> imgWarning
                          Type.INFO -> imgInfo
                      }, kek + 5, -25F - y, 7, 7)
                      GlStateManager.enableAlpha()
                      GL11.glPopMatrix()
      
                      Fonts.minecraftFont.drawStringWithShadow(message, -x - 4, -13F - y, -1)
                  }
              }
      
              when (fadeState) {
                  FadeState.IN -> {
                      if (x < width) {
                          if (newAnim) 
                              x = net.ccbluex.liquidbounce.utils.AnimationUtils.animate(width, x, animSpeed * 0.025F * delta)
                          else 
                              x = AnimationUtils.easeOut(fadeStep, width) * width
                          fadeStep += delta / 4F
                      }
                      if (x >= width) {
                          fadeState = FadeState.STAY
                          x = width
                          fadeStep = width
                      }
      
                      stay = 60F
                      stayTimer.reset()
                  }
      
                  FadeState.STAY -> {
                      if (stay > 0) {
                          stay = 0F
                          stayTimer.reset()
                      }
                      if (stayTimer.hasTimePassed(displayTime))
                          fadeState = FadeState.OUT
                  }
      
                  FadeState.OUT -> if (x > 0) {
                      if (newAnim) 
                          x = net.ccbluex.liquidbounce.utils.AnimationUtils.animate(-width, x, animSpeed * 0.025F * delta)
                      else 
                          x = AnimationUtils.easeOut(fadeStep, width) * width
      
                      fadeStep -= delta / 4F
                  } else
                      fadeState = FadeState.END
      
                  FadeState.END -> hud.removeNotification(this)
              }        
          }
      }
      
      

      icon and ending photo!
      58CEA7EF-A755-4D52-9115-48F5C0E45083.png 55D78E4E-2882-4605-9869-8EC44C3B25AD.png 230046AE-FDC0-43BB-B75A-D00AA7872B8F.png 4B50C6C2-7A01-449F-9D0B-7405554E7E10.png 7E15207E-EDCD-438B-A8FA-643925E7C81D.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: A Notification Theme like IntelliJ IDEA.

      @koitoyuu thx

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Form to show your own player‘s imformation

      it is coded for chinese,if you want to get different language you can change it

      
      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.font.Fonts
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.minecraft.client.gui.Gui
      import net.minecraft.client.renderer.GlStateManager
      import net.minecraft.util.ResourceLocation
      import org.lwjgl.opengl.GL11
      import java.awt.Color
      
      @ElementInfo(name = "ShowPlayerInformation")
      class ShowPlayerInformation : Element() {
          override fun drawElement(): Border {
              RenderUtils.drawBorderedRect(0F, -20F, 142F, 35F, 2F, Color(40,40,40,240).rgb, Color(20, 20, 20, 60).rgb)
              RenderUtils.drawBorderedRect(0F, -20F, 142F, 35F, 0.5F, Color(255,255,255,120).rgb, Color(255, 180, 255, 0).rgb)
              RenderUtils.drawBorderedRect(0F, -10F, 142F, 35F, 2F, Color(40,40,40,240).rgb, Color(255, 190, 255, 0).rgb)
              RenderUtils.drawBorderedRect(0F, -10F, 142F, 35F, 0.5F, Color(255,255,255,120).rgb, Color(255, 180, 255, 0).rgb)
              var BpsFloat = Math.sqrt(Math.pow(mc.thePlayer!!.posX - mc.thePlayer!!.prevPosX, 2.0) + Math.pow(mc.thePlayer!!.posZ - mc.thePlayer!!.prevPosZ, 2.0)) * 20 * mc.timer.timerSpeed
              var BpsDouble = (BpsFloat * 100 - (BpsFloat * 100) % 1) / 100
              GL11.glPushMatrix()
              GL11.glEnable(GL11.GL_BLEND)
              GL11.glDisable(GL11.GL_TEXTURE_2D)
              GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
              GL11.glEnable(GL11.GL_LINE_SMOOTH)
              GL11.glDisable(GL11.GL_CULL_FACE)
              GL11.glShadeModel(7425)
      
              GL11.glBegin(GL11.GL_POLYGON)
      
              GlStateManager.color(20 / 255f, 20 / 255f, 20 / 255f, 185 / 255f)
              GL11.glVertex2d(0f.toDouble(), (-10f).toDouble())
              GL11.glVertex2d(142f.toDouble(), (-10f).toDouble())
              GlStateManager.color(20 / 255f, 20 / 255f, 20 / 255f,20 / 255f)
              GL11.glVertex2d(142f.toDouble(), 37f.toDouble())
              GL11.glVertex2d(0f.toDouble(), 37f.toDouble())
              GL11.glEnd()
      
              GL11.glShadeModel(7424)
              GL11.glEnable(GL11.GL_TEXTURE_2D)
              GL11.glEnable(GL11.GL_CULL_FACE)
              GL11.glDisable(GL11.GL_BLEND)
              GL11.glDisable(GL11.GL_LINE_SMOOTH)
              GL11.glPopMatrix()
      
              Fonts.font35.drawString("本玩家展示栏目表",35f , -18f, Color.WHITE.rgb)
              Fonts.font35.drawString("信息:", 5f, -5f, Color.WHITE.rgb)
              Fonts.font35.drawString("头:", 85f, -5f, Color.WHITE.rgb)
      
              Fonts.fontRegular35.drawString("  名字: " + mc.thePlayer.name, 0.5f, 5f, Color(255, 255, 255, 200).rgb, shadow = true)
              Fonts.fontRegular35.drawString("  速度: ${BpsDouble} Bps", 0.5F, 15F, Color(255, 255, 255, 200).rgb, shadow = true)
              Fonts.fontRegular35.drawString("  等级: " + mc.thePlayer.experienceLevel + " " + "级", 0.5f, 25f, Color(255, 255, 255, 200).rgb, shadow = true)
              drawHead(skin = mc.thePlayer.locationSkin, width = 40, height = 40);
              return Border(0F, 0f, 142F,  35F)
          }
          private fun drawHead(skin: ResourceLocation, width: Int, height: Int) {
              GL11.glColor4f(1F, 1F, 1F, 1F)
              mc.textureManager.bindTexture(skin)
              Gui.drawScaledCustomSizeModalRect(99, -8, 8F, 8F, 8, 8, width, height,
                      64F, 64F)
          }
      }
      /*
      * @Coder Larissa
      * welcome to use
      * */
      
      

      3F84AD22-C0D5-4F58-824D-7FFA76E3C909.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Targethud Modeled on Remix

      a part of codes

      
      "Remix" -> {
                          var r = 0
                          var g = 0
                          var b = 0
      
                          RenderUtils.drawRect(-1F, -1F, 154F, 52F,Color(25,25,25).rgb) //draw bg outline
                          RenderUtils.drawRect(1F, 1F, 152F, 50F,Color(45,45,45).rgb) //draw bg
                          Fonts.minecraftFont.drawStringWithShadow(convertedTarget.name, 44F , 5F, Color(255,255,255).rgb)
      
                          //draw head outline
                          RenderUtils.drawRect(3F,3F,39F,39F, Color(205,205,205).rgb)
      
                          //draw head
                          if (mc.netHandler.getPlayerInfo(convertedTarget.uniqueID) != null) {
                              drawHead(mc.netHandler.getPlayerInfo(convertedTarget.uniqueID).locationSkin, 4, 4, 34, 34)
                          }
      
                          //draw heal bg
                          RenderUtils.drawRect(3F, 41F, 150F, 48F, Color(124,0,0).rgb)
      
                          //draw damage anima
                          if (easingHealth > convertedTarget.health)
                              RenderUtils.drawRect(0F, 34F, (easingHealth / convertedTarget.maxHealth) * width,Color(0, 255, 0, 150).rgb)
                          }
      
                          //draw heal bar
                          RenderUtils.drawRect(0F, 34F, (convertedTarget.health / convertedTarget.maxHealth) * width,
                                  36F, Color(0,255,0).rgb)
      
                          //draw armor outline
                          RenderUtils.drawRect(44F, 17F, 62F, 35F, Color(25,25,25).rgb)
                          RenderUtils.drawRect(66F, 17F, 84F, 35F, Color(25,25,25).rgb)
                          RenderUtils.drawRect(88F, 17F, 106F, 35F, Color(25,25,25).rgb)
                          RenderUtils.drawRect(110F, 17F, 128F, 35F, Color(25,25,25).rgb)
      
                          //draw armor bg
                          RenderUtils.drawRect(45F, 18F, 61F, 34F, Color(95,95,95).rgb)
                          RenderUtils.drawRect(67F, 18F, 83F, 34F, Color(95,95,95).rgb)
                          RenderUtils.drawRect(89F, 18F, 105F, 34F, Color(95,95,95).rgb)
                          RenderUtils.drawRect(111F, 18F, 127F, 34F, Color(95,95,95).rgb)
      
                          //draw armor bar bg
                          RenderUtils.drawRect(44F, 36F, 149.5F, 39F, Color(0,0,255).rgb)
      
                          //draw armor bar
                          if (convertedTarget.getTotalArmorValue() != 0) {
                              RenderUtils.drawRect(44F, 36F, 30F + (convertedTarget.getTotalArmorValue()) * 6F, 39F, Color(36,77,255).rgb) // Draw armor bar
                          }
      
                          //render armor
                          var x = 45
                          var y = 18
      
                          for (index in 3 downTo 0) {
                              val stack = convertedTarget.inventory.armorInventory[index] ?: continue
      
                              if (stack.getItem() == null)
                                  continue
                              mc.renderItem.renderItemIntoGUI(stack, x, y)
                              mc.renderItem.renderItemOverlays(mc.fontRendererObj, stack, x, y)
      
                              x += 22
                          }
                      }
      
      

      8A981A1A-57BB-478C-A6E7-4E846195ACF1.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: Chat message detector and deleter

      @ximatendr In the case of a lower version, may we need the detection of S02Packet?

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: A Simple Ugly PlayerInfo can be used

      @ybyyby180 thx

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: A simply and pink Targethud

      @squidward thx

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Pink button theme

      MixinGuiButton

      package net.ccbluex.liquidbounce.injection.forge.mixins.gui;
      
      import net.ccbluex.liquidbounce.ui.font.AWTFontRenderer;
      import net.ccbluex.liquidbounce.ui.font.Fonts;
      import net.ccbluex.liquidbounce.utils.render.RenderUtils;
      import net.minecraft.client.Minecraft;
      import net.minecraft.client.gui.FontRenderer;
      import net.minecraft.client.gui.Gui;
      import net.minecraft.client.gui.GuiButton;
      import net.minecraft.client.renderer.GlStateManager;
      import net.minecraft.util.ResourceLocation;
      import net.minecraftforge.fml.relauncher.Side;
      import net.minecraftforge.fml.relauncher.SideOnly;
      import org.spongepowered.asm.mixin.Final;
      import org.spongepowered.asm.mixin.Mixin;
      import org.spongepowered.asm.mixin.Overwrite;
      import org.spongepowered.asm.mixin.Shadow;
      
      import java.awt.*;
      
      
      @Mixin(GuiButton.class)
      @SideOnly(Side.CLIENT)
      public abstract class MixinGuiButton extends Gui {
      
         @Shadow
         public boolean visible;
      
         @Shadow
         public int xPosition;
      
         @Shadow
         public int yPosition;
      
         @Shadow
         public int width;
      
         @Shadow
         public int height;
      
         @Shadow
         protected boolean hovered;
      
         @Shadow
         public boolean enabled;
      
         @Shadow
         protected abstract void mouseDragged(Minecraft mc, int mouseX, int mouseY);
      
         @Shadow
         public String displayString;
      
         @Shadow
         @Final
         protected static ResourceLocation buttonTextures;
         private float cut;
         private float alpha;
      
         @Overwrite
         public void drawButton(Minecraft mc, int mouseX, int mouseY) {
            if (visible) {
               final FontRenderer fontRenderer =
                  mc.getLanguageManager().isCurrentLocaleUnicode() ? mc.fontRendererObj : Fonts.font35;
               hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition &&
                          mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
      
               final int delta = RenderUtils.deltaTime;
      
               if (enabled && hovered) {
                  cut += 0.05F * delta;
      
                  if (cut >= 4) cut = 4;
      
                  alpha += 0.3F * delta;
      
                  if (alpha >= 210) alpha = 210;
               } else {
                  cut -= 0.05F * delta;
      
                  if (cut <= 0) cut = 0;
      
                  alpha -= 0.3F * delta;
      
                  if (alpha <= 120) alpha = 120;
               }
      
               Gui.drawRect(this.xPosition + (int) this.cut, this.yPosition,
                       this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,
                       this.enabled ? new Color(1F, 0.8F, 1F, this.alpha / 255F).getRGB() :
                               new Color(1F, 0.7F, 1F, 1F).getRGB());
               RenderUtils.drawBorderedRect(this.xPosition + (int) this.cut, this.yPosition,
                       this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,3F, new Color(255,200,255,255).getRGB(), new Color(255, 190, 255, 50).getRGB());
               RenderUtils.drawBorderedRect(this.xPosition + (int) this.cut, this.yPosition,
                       this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,1F, new Color(30,30,30,180).getRGB(), new Color(255, 180, 255, 0).getRGB());
      
               mc.getTextureManager().bindTexture(buttonTextures);
               mouseDragged(mc, mouseX, mouseY);
      
               AWTFontRenderer.Companion.setAssumeNonVolatile(true);
      
               fontRenderer.drawStringWithShadow(displayString,
                       (float) ((this.xPosition + this.width / 2) -
                               fontRenderer.getStringWidth(displayString) / 2),
                       this.yPosition + (this.height - 5) / 2F, 14737632);
      
               AWTFontRenderer.Companion.setAssumeNonVolatile(false);
      
               GlStateManager.resetColor();
            }
         }
      }
      

      and MixinButtonExt

      package net.ccbluex.liquidbounce.injection.forge.mixins.gui;
      
      import net.ccbluex.liquidbounce.ui.font.Fonts;
      import net.ccbluex.liquidbounce.utils.render.RenderUtils;
      import net.minecraft.client.Minecraft;
      import net.minecraft.client.gui.FontRenderer;
      import net.minecraft.client.gui.GuiButton;
      import net.minecraft.client.renderer.GlStateManager;
      import net.minecraftforge.fml.client.config.GuiButtonExt;
      import net.minecraftforge.fml.relauncher.Side;
      import net.minecraftforge.fml.relauncher.SideOnly;
      import org.spongepowered.asm.mixin.Mixin;
      import org.spongepowered.asm.mixin.Overwrite;
      
      import java.awt.*;
      
      @Mixin(GuiButtonExt.class)
      @SideOnly(Side.CLIENT)
      public abstract class MixinGuiButtonExt extends GuiButton {
         private float cut;
         private float alpha;
      
         public MixinGuiButtonExt(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_) {
            super(p_i1020_1_, p_i1020_2_, p_i1020_3_, p_i1020_4_);
         }
      
         public MixinGuiButtonExt(int p_i46323_1_, int p_i46323_2_, int p_i46323_3_, int p_i46323_4_,
                                  int p_i46323_5_, String p_i46323_6_) {
            super(p_i46323_1_, p_i46323_2_, p_i46323_3_, p_i46323_4_, p_i46323_5_, p_i46323_6_);
         }
      
         @Overwrite
         public void drawButton(Minecraft mc, int mouseX, int mouseY) {
            if (visible) {
               final FontRenderer fontRenderer =
                  mc.getLanguageManager().isCurrentLocaleUnicode() ? mc.fontRendererObj : Fonts.font35;
               hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition &&
                          mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
      
               final int delta = RenderUtils.deltaTime;
      
               if (enabled && hovered) {
                  cut += 0.05F * delta;
      
                  if (cut >= 4) cut = 4;
      
                  alpha += 0.3F * delta;
      
                  if (alpha >= 210) alpha = 210;
               } else {
                  cut -= 0.05F * delta;
      
                  if (cut <= 0) cut = 0;
      
                  alpha -= 0.3F * delta;
      
                  if (alpha <= 120) alpha = 120;
               }
               RenderUtils.drawCircleRect(this.xPosition + (int) this.cut, this.yPosition,
                            this.xPosition + this.width - (int) this.cut, this.yPosition + this.height,
                            2f,this.enabled ? new Color(0F, 0F, 0F, this.alpha / 255F).getRGB() :
                            new Color(0.5F, 0.5F, 0.5F, 0.5F).getRGB(),true);
      
               mc.getTextureManager().bindTexture(buttonTextures);
               mouseDragged(mc, mouseX, mouseY);
      
               fontRenderer.drawStringWithShadow(displayString,
                                                 (float) ((this.xPosition + this.width / 2) -
                                                          fontRenderer.getStringWidth(displayString) / 2),
                                                 this.yPosition + (this.height - 5) / 2F, 14737632);
               GlStateManager.resetColor();
            }
         }
      }
      

      just copy it and replace😁😁😁❤️❤️

      4C04C1E5-8D76-4F2E-90F5-71BD279BA909.png F9A3B193-2A01-4C31-903C-BEE2CCB53095.png 72993B4E-55CD-4F18-A8D4-347E1D040F2E.png A9048A6F-0DA1-4803-9E78-6846EE1952A5.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Playerinfo full of girlishness
      
      import net.ccbluex.liquidbounce.ui.client.hud.element.ElementInfo
      import net.ccbluex.liquidbounce.ui.client.hud.element.Element
      import net.ccbluex.liquidbounce.ui.client.hud.element.Border
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.ccbluex.liquidbounce.features.module.modules.misc.BanChecker
      import net.ccbluex.liquidbounce.ui.font.Fonts
      import net.ccbluex.liquidbounce.value.BoolValue
      import net.ccbluex.liquidbounce.value.FontValue
      import net.ccbluex.liquidbounce.value.IntegerValue
      import net.minecraft.client.Minecraft
      import net.minecraft.client.renderer.GlStateManager
      import org.lwjgl.opengl.GL11
      import java.awt.Color
      
      
      @ElementInfo(name = "PlayerInfo")
      class PlayerInfo : Element() {
          var HM = 0
          var S = 0
          var M = 0
          var H = 0
          private val title = BoolValue("Title", true)
          private val fontValue = FontValue("Font", Fonts.fontRegular38)
          override fun drawElement(): Border {
              HM += 1;
              if (HM == 120) {
                  S += 1;
                  HM = 0;
              }
              if (S == 60) {
                  M += 1
                  S = 0
              }
              if (M == 60) {
                  H += 1
                  M = 0
              }
              val font = fontValue.get()
              val startY = if (title.get()) {
                  -(6 + font.FONT_HEIGHT)
              } else {
                  0
              }.toFloat()
      
              RenderUtils.drawBorderedRect(0F, -10F, 120F, 45F, 4F, Color(255,200,255,255).rgb, Color(255, 190, 255, 80).rgb)
              RenderUtils.drawBorderedRect(0F, -10F, 120F, 45F, 1.5F, Color(30,30,30,180).rgb, Color(255, 180, 255, 0).rgb)
              RenderUtils.drawRect(0F,2.2F,120F,3F,Color(255,190,255,230).rgb)
              RenderUtils.drawRect(0F,2.5F,120F,2F,Color(30,30,30,180).rgb)
      
              var BpsFloat = Math.sqrt(Math.pow(mc.thePlayer!!.posX - mc.thePlayer!!.prevPosX, 2.0) + Math.pow(mc.thePlayer!!.posZ - mc.thePlayer!!.prevPosZ, 2.0)) * 20 * mc.timer.timerSpeed
              var BpsDouble = (BpsFloat * 100 - (BpsFloat * 100) % 1) / 100
      
              GL11.glPushMatrix()
              GL11.glEnable(GL11.GL_BLEND)
              GL11.glDisable(GL11.GL_TEXTURE_2D)
              GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
              GL11.glEnable(GL11.GL_LINE_SMOOTH)
              GL11.glDisable(GL11.GL_CULL_FACE)
              GL11.glShadeModel(7425)
      
      
              GL11.glBegin(GL11.GL_POLYGON)
      
              GlStateManager.color(0 / 255f, 0 / 255f, 0 / 255f, 60 / 255f)
              GL11.glVertex2d(0f.toDouble(), (-10f).toDouble())
              GL11.glVertex2d(120f.toDouble(), (-10f).toDouble())
              GlStateManager.color(0 / 255f, 0 / 255f, 0 / 255f, 25 / 255f)
              GL11.glVertex2d(120f.toDouble(), 44f.toDouble())
              GL11.glVertex2d(0f.toDouble(), 44f.toDouble())
              GL11.glEnd()
      
              GL11.glShadeModel(7424)
              GL11.glEnable(GL11.GL_TEXTURE_2D)
              GL11.glEnable(GL11.GL_CULL_FACE)
              GL11.glDisable(GL11.GL_BLEND)
              GL11.glDisable(GL11.GL_LINE_SMOOTH)
              GL11.glPopMatrix()
      
              Fonts.font35.drawString("PlayerInfo", 40f, -5f, Color.WHITE.rgb)
              Fonts.fontRegular32.drawString("  PlayTime§7:§f${M}min${S}sec", 1f, 6f, Color(255, 255, 255, 200).rgb, shadow = true)
              Fonts.fontRegular32.drawString("  Staff: ${BanChecker.STAFF_BAN_LAST_MIN} WatchDog: ${BanChecker.WATCHDOG_BAN_LAST_MIN}", 1f, 16f, Color(255, 255, 255, 200).rgb, shadow = true)
              Fonts.fontRegular32.drawString("  ${BpsDouble} Blocks§7/§fS", 1F, 27F, Color(255, 255, 255, 200).rgb, shadow = true)
              Fonts.fontRegular32.drawString("  FPS§7:§f${Minecraft.getDebugFPS().toString()}" + 2, 1F, 37F, Color(255, 255, 255, 200).rgb, shadow = true)
      
              return Border(0F, 0f, 100F, 40F)
          }
      }
      

      welcome to use it😄😀😀
      B085C847-CE7A-46DB-9F87-F864E37D825E.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Notifications like Tenacity Client

      first,you should add this into the Easeutils

      
      @JvmStatic
          fun easeInExpo(x: Double): Double {
              return if(x == 0.0){0.0}else{2.0.pow(10 * x - 10)}
          }
      
          @JvmStatic
          fun easeOutExpo(x: Double): Double {
              return if(x == 1.0){1.0}else{1 - 2.0.pow(-10 * x)}
          }
      
      

      and this is the code in the elements files

      
      package net.ccbluex.liquidbounce.ui.client.hud.element.elements
      
      import com.sun.tracing.dtrace.ModuleName
      import net.ccbluex.liquidbounce.LiquidBounce
      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.ui.font.Fonts
      import net.ccbluex.liquidbounce.utils.render.EaseUtils
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.minecraft.util.ResourceLocation
      import org.lwjgl.opengl.GL11
      import java.awt.Color
      
      @ElementInfo(name = "Notifications")
      class Notifications(x: Double = 6.0, y: Double = 60.0, scale: Float = 1F,
                          side: Side = Side(Side.Horizontal.RIGHT, Side.Vertical.DOWN)) : Element(x, y, scale, side) {
      
          override fun drawElement(): Border? {
      
              LiquidBounce.hud.notifications.map { it }.forEachIndexed { index, notify ->
                  GL11.glPushMatrix()
                  if(notify.drawNotification(index)){
                      LiquidBounce.hud.notifications.remove(notify)
                  }
                  GL11.glPopMatrix()
              }
              if (mc.currentScreen is GuiHudDesigner) {
              }
              return null
          }
      }
      
      class Notification(val title: String, val content: String, val type: NotifyType, val time: Int=1500, val animeTime: Int=500) {
          val width=100.coerceAtLeast(Fonts.fontRegular38.getStringWidth(this.title)
                  .coerceAtLeast(Fonts.fontRegular38.getStringWidth(this.content)) + 20)
          val height=27
          var fadeState = FadeState.IN
          var nowY=-height
          var animeXTime=System.currentTimeMillis()
          var animeYTime=System.currentTimeMillis()
          val error = ResourceLocation("liquidbounce/notification/disable.png")
          val successful = ResourceLocation("liquidbounce/notification/enable.png")
      
          fun drawNotification(index: Int):Boolean {
              val realY=(-(index)*height*1.25).toInt()
              val nowTime=System.currentTimeMillis()
      
              if(nowY!=realY){
                  var pct=(nowTime-animeYTime)/animeTime.toDouble()
                  if(pct>1){
                      nowY=realY
                      pct=1.0
                  }else{
                      pct=EaseUtils.easeOutExpo(pct)
                  }
                  GL11.glTranslated(0.0,(realY-nowY)*pct,0.0)
              }else{
                  animeYTime=nowTime
              }
              GL11.glTranslated(0.0,nowY.toDouble(),0.0)
      
              var larissa=(nowTime-animeXTime)/animeTime.toDouble()
              when(fadeState){
                  FadeState.IN -> {
                      if(larissa>1){
                          fadeState=FadeState.STAY
                          animeXTime=nowTime
                          larissa=1.0
                      }
                      larissa=EaseUtils.easeOutExpo(larissa)
                  }
                  FadeState.STAY -> {
                      larissa=1.0
                      if((nowTime-animeXTime)>time){
                          fadeState=FadeState.OUT
                          animeXTime=nowTime
                      }
                  }
                  FadeState.OUT -> {
                      if(larissa>1){
                          fadeState=FadeState.END
                          animeXTime=nowTime
                          larissa=1.0
                      }
                      larissa=1-EaseUtils.easeInExpo(larissa)
                  }
                  FadeState.END -> {
                      return true
                  }
              }
              GL11.glTranslated(width-(width*larissa),0.0,0.0)
              GL11.glTranslatef(-width.toFloat(),0F,0F)
      
              if(type.renderColor == Color(0xFF2F2F)){
                  RenderUtils.drawCircleRect(-18F,0F,width.toFloat(),height.toFloat(),6f,Color(180,0,0,190).rgb,true)
                  RenderUtils.drawImage(error,-13,5,18,18)
                  Fonts.fontBold35.drawString(title,9F,17F,Color(255,255,255,255).rgb)
                  Fonts.fontBold40.drawString(content,9F,6F,Color(255,255,255,255).rgb)
              }else if(type.renderColor == Color(0x60E092)){
                  RenderUtils.drawCircleRect(-16F,0F,width.toFloat(),height.toFloat(),6f,Color(0,180,0,190).rgb,true)
                  RenderUtils.drawImage(successful,-13,5,18,18)
                  Fonts.fontBold35.drawString(title,9F,17F,Color(255,255,255,255).rgb)
                  Fonts.fontBold40.drawString(content,9F,6F,Color(255,255,255,255).rgb)
              }
              return false
          }
      }
      enum class NotifyType(var renderColor: Color) {
          SUCCESS(Color(0x60E092)),
          ERROR(Color(0xFF2F2F)),
      
      }
      
      enum class FadeState { IN, STAY, OUT, END }
      
      

      but it is not good to copy into the liquidbounceplus
      the assets and photos:
      D6EF1710-3DE8-476F-A7D6-756D08666F11.png CBEDE78F-B6B4-40F4-B3E0-83827AB90C96.jpeg 927189E0-06DD-4B2F-8902-FAB82C4DA1B9.png

      posted in Kotlin/Java
      Larissa
      Larissa

    Latest posts made by Larissa

    • A long shape of the template TargetHUD

      it just a Mould,you can add other decorations on it by yourself!
      这只是一个模板,你可以自己加上其他装饰!:axofast: :axofast:

      package net.ccbluex.liquidbounce.ui.client.hud.element.elements
      
      import net.ccbluex.liquidbounce.LiquidBounce
      import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura
      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.font.Fonts
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.ccbluex.liquidbounce.value.FloatValue
      import net.minecraft.client.gui.Gui
      import net.minecraft.entity.Entity
      import net.minecraft.entity.player.EntityPlayer
      import net.minecraft.util.ResourceLocation
      import org.lwjgl.opengl.GL11
      import java.awt.Color
      import kotlin.math.abs
      import kotlin.math.pow
      
      /**
       * A target hud
       */
      @ElementInfo(name = "Target3")
      class Target3 : Element() {
      
          private val fadeSpeed = FloatValue("AnimationsSpeed", 2F, 1F, 10F)
          private var easingHealth: Float = 0F
          private var lastTarget: Entity? = null
      
          override fun drawElement(): Border {
              val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target
      
              if (target is EntityPlayer) {
                  if (target != lastTarget || easingHealth < 0 || easingHealth > target.maxHealth ||
                          abs(easingHealth - target.health) < 0.01) {
                      easingHealth = target.health
                  }
      
                  val width = (38 + Fonts.font40.getStringWidth(target.name))
                          .coerceAtLeast(118)
                          .toFloat()
      
                  RenderUtils.drawBorderedRect(0F, 0F, width, 35.8F, 0F,Color(0,0,0,0).rgb,Color(0,0,0,220).rgb)
                  RenderUtils.drawBorderedRect(0F, 0F, width, 35.8F, 1.2F, Color(255,255,255,250).rgb,Color(0,0,0,0).rgb)
                  RenderUtils.drawBorderedRect(37F, 3.2F,113F + 0f, 32.8F, 0.8F, Color(255,255,255,240).rgb,Color(0,0,0,0).rgb)
                  RenderUtils.drawRect(37F, 3.2F,113F + 0f, 32.8F, Color(70,70,70,230).rgb)
      
                  if (easingHealth > target.health)
                      RenderUtils.drawRect(37F, 3.2F, (target.health / target.maxHealth) * width -3.5F,
                              32.8F, Color(138, 60, 65).rgb)
      
                  if(target.hurtTime > 9){
                      RenderUtils.drawRect(37F, 3.2F, (target.health / target.maxHealth) * width -3.5F,
                              32.8F, Color(149, 9, 17).rgb)
                  } else {
                      RenderUtils.drawRect(37F, 3.2F, (target.health / target.maxHealth) * width + -3.5F,
                              32.8F, Color(255, 255, 255,240).rgb)
                      Fonts.fontBold35.drawStringWithShadow("HP:${(target.getHealth())}0", 57F, 15F, Color(0,0,0,0).rgb)
                  }
                  easingHealth += ((target.health - easingHealth) / 2.0F.pow(10.0F - fadeSpeed.get())) * RenderUtils.deltaTime
                  val playerInfo = mc.netHandler.getPlayerInfo(target.uniqueID)
                  if (playerInfo != null) {
                      val locationSkin = playerInfo.locationSkin
                      drawHead(locationSkin, 32, 32)
                  }
              }
              lastTarget = target
              return Border(0F, 0F, 120F, 36F)
          }
          private fun drawHead(skin: ResourceLocation, width: Int, height: Int) {
              GL11.glColor4f(1F, 1F, 1F, 1F)
              mc.textureManager.bindTexture(skin)
              Gui.drawScaledCustomSizeModalRect(2, 2, 8F, 8F, 8, 8, width, height,
                      64F, 64F)
          }
      //codes larissa
      }
      
      

      it is the finished product::axofight: :axofighter:

      B@NFX5J`KZ)N.png

      GHDTS{4R9_D.png

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: Custom Cape Module

      @Koitoyuu 奶思

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: [Source Share] Fake New Novoline Notification In Custom LiquidBounce

      @Gking nice codes!my dear!

      posted in Scripts
      Larissa
      Larissa
    • RE: Fake FPS Module

      @koitoyuu so good i love u ❤️

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: A dynamic Crosshair and Add method.

      @aftery said in A dynamic Crosshair and Add method.:

      looks very complicated for something that looks worse than the 1.6 crosshair, nice release though

      Thank you, maybe I will improve it in the future!😊

      posted in Kotlin/Java
      Larissa
      Larissa
    • A dynamic Crosshair and Add method.

      English: I think the original version of Minecraft is not very good-looking, so I wrote a new crosshair and I will tell you the complete adding method.
      Chinese: 我认为mc原版的指针不是很好看,所以我写了一个新的crosshair并且我会告诉你完整的添加方法.

      First,you should add these to the Renderutils.
      首先,你需要添加这些进入显示工具包.

      
      public static int width() {
              return new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth();
          }
          public static int height() {
              return new ScaledResolution(Minecraft.getMinecraft()).getScaledHeight();
          }
      
      

      Then,add the method called showcrosshair to the mixinguiingame.
      然后,添加展示指针的方法在mixinguiingame中.

      
      @Overwrite
          protected boolean showCrosshair() {
              Minecraft mc = Minecraft.getMinecraft();
              if (mc.gameSettings.showDebugInfo && !mc.thePlayer.hasReducedDebug()
                      && !mc.gameSettings.reducedDebugInfo) {
                  return false;
              } else if (mc.playerController.isSpectator()) {
                  if (mc.pointedEntity != null) {
                      return true;
                  } else {
                      if (mc.objectMouseOver != null
                              && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
                          BlockPos blockpos = mc.objectMouseOver.getBlockPos();
      
                          return mc.theWorld.getTileEntity(blockpos) instanceof IInventory;
                      }
                      return false;
                  }
      
              }
              return !LiquidBounce.moduleManager.getModule(HUD.class).getState();
          }
      
      

      Finally,add the codes into the Module:HUD.
      最后,添加代码进入模块:HUD.

      
      @EventTarget
          public void drawRender2D(Render2DEvent render2DEvent){
              int lrs1 = RenderUtils.width();
              int lrs2 = RenderUtils.height();
              if (!mc.thePlayer.isSprinting()) {
                  Gui.drawRect(lrs1 / 2 - 3 - 3, lrs2 / 2, lrs1 / 2 + 6 - 8, lrs2 / 2 + 2 - 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2 - 6, lrs2 / 2, lrs1 / 2 - 2, lrs2 / 2 + 1,0.7582394175F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2 + 6 - 3, lrs2 / 2, lrs1 / 2 + 10 - 3, lrs2 / 2 + 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2 + 3, lrs2 / 2, lrs1 / 2 + 7, lrs2 / 2 + 1,0.7635230967F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2 - 6, lrs1 / 2 + 1, lrs2 / 2 - 2, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2 + 1 - 1, lrs2 / 2 - 6, lrs1 / 2 + 1, lrs2 / 2 - 2,0.7572856197F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2 + 6 - 3, lrs1 / 2 + 1, lrs2 / 2 + 7, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2, lrs2 / 2 + 6 - 3, lrs1 / 2 + 1, lrs2 / 2 + 10 - 3,0.7543869547F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2, lrs1 / 2 + 1, lrs2 / 2 + 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2, lrs2 / 2, lrs1 / 2 + 1, lrs2 / 2 + 1,0.7543869547F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
              } else {
                  Gui.drawRect(lrs1 / 2 + 10 - 19, lrs2 / 2, lrs1 / 2 + 5 - 10, lrs2 / 2 + 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2 - 9, lrs2 / 2, lrs1 / 2 - 5, lrs2 / 2 + 1,0.7582394175F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2 + 6, lrs2 / 2, lrs1 / 2 + 10, lrs2 / 2 + 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2 + 6, lrs2 / 2, lrs1 / 2 + 5 + 5, lrs2 / 2 + 1,0.7635230967F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2 - 9, lrs1 / 2 + 1, lrs2 / 2 - 5, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2, lrs2 / 2 - 9, lrs1 / 2 + 1, lrs2 / 2 - 5,0.7572856197F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2 + 2 + 4, lrs1 / 2 + 1, lrs2 / 2 + 10, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2, lrs2 / 2 + 3 + 3, lrs1 / 2 + 1, lrs2 / 2 + 3 + 7,0.7543869547F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
                  Gui.drawRect(lrs1 / 2, lrs2 / 2, lrs1 / 2 + 1, lrs2 / 2 + 1, new Color(255,255,255, 255).getRGB());
                  RenderUtils.drawBorderedRect(lrs1 / 2, lrs2 / 2, lrs1 / 2 + 1, lrs2 / 2 + 1,0.7543869547F, new Color(0,0,0,255).getRGB(), new Color(255, 190, 255, 0).getRGB());
              }
          }
      
      

      and this is the ending picture,welcome to use!

      when slient or sprinting
      当静止时和疾跑时

      DC51617C-1275-444F-9713-C163943EE284.jpeg 2FB394E3-E465-41B3-AF87-4405308D09BA.jpeg

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Simple HealthBar TargetHUD

      main codes

      
      package net.ccbluex.liquidbounce.ui.client.hud.element.elements
      
      import net.ccbluex.liquidbounce.LiquidBounce
      import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura
      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.font.Fonts
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.ccbluex.liquidbounce.value.FloatValue
      import net.minecraft.entity.Entity
      import net.minecraft.entity.player.EntityPlayer
      import java.awt.Color
      import kotlin.math.abs
      import kotlin.math.pow
      
      @ElementInfo(name = "Target")
      class Target : Element() {
      
          private var Health: Float = 0F
          private var EndingTarget: Entity? = null
          private val BarAnimationSpeed = FloatValue("BarAnimationSpeed", 2F, 1F, 9F)
      
          override fun drawElement(): Border {
              val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target
      
              if (target is EntityPlayer) {
                  if (target != EndingTarget || Health < 0 || Health > target.maxHealth ||
                          abs(Health - target.health) < 0.01) {
                      Health = target.health
                  }
      
                  val width = (38 + Fonts.font40.getStringWidth(target.name))
                          .coerceAtLeast(119)
                          .toFloat()
      
                  RenderUtils.drawBorderedRect(3F, 37F, 115F, 42F, 4.2F, Color(16, 16, 16, 255).rgb, Color(10, 10, 10, 100).rgb)
                  RenderUtils.drawBorderedRect(3F, 37F, 115F, 42F, 1.2F, Color(255, 255, 255, 180).rgb, Color(255, 180, 255, 0).rgb)
                  if (Health > target.health)
                      RenderUtils.drawRect(3F, 37F, (Health / target.maxHealth) * width - 4F,
                              42F, Color(250, 0, 0, 120).rgb)
                  RenderUtils.drawRect(3.2F, 37F, (target.health / target.maxHealth) * width - 4F,
                          42F, Color(220, 0, 0, 220).rgb)
                  if (Health < target.health)
                      RenderUtils.drawRect((Health / target.maxHealth) * width, 37F,
                              (target.health / target.maxHealth) * width, 42F, Color(44, 201, 144).rgb)
                  RenderUtils.drawBorderedRect(3F, 37F, 115F, 42F, 1.2F, Color(255, 255, 255, 180).rgb, Color(255, 180, 255, 0).rgb)
      
      
                  Health += ((target.health - Health) / 2.0F.pow(10.0F - BarAnimationSpeed.get())) * RenderUtils.deltaTime
      
                  mc.fontRendererObj.drawStringWithShadow("" + target.name, 36F, 22F, 0xFFFFFF)
              }
              EndingTarget = target
              return Border(0F, 0F, 120F, 36F)
          }
      }
      
      

      This is the final effect. He also has the animation of blood deduction and blood recovery. Welcome to use it

      96FF4575-8B60-4EC8-BF98-C1AF4FF433B5.jpeg 2CFC1094-008E-46D9-BD5C-8478C476FA53.jpeg

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: 好的表格

      @taffypoole ok!!

      posted in Kotlin/Java
      Larissa
      Larissa
    • RE: Chat message detector and deleter

      @ximatendr In the case of a lower version, may we need the detection of S02Packet?

      posted in Kotlin/Java
      Larissa
      Larissa
    • A Notifications like Tenacity Client

      first,you should add this into the Easeutils

      
      @JvmStatic
          fun easeInExpo(x: Double): Double {
              return if(x == 0.0){0.0}else{2.0.pow(10 * x - 10)}
          }
      
          @JvmStatic
          fun easeOutExpo(x: Double): Double {
              return if(x == 1.0){1.0}else{1 - 2.0.pow(-10 * x)}
          }
      
      

      and this is the code in the elements files

      
      package net.ccbluex.liquidbounce.ui.client.hud.element.elements
      
      import com.sun.tracing.dtrace.ModuleName
      import net.ccbluex.liquidbounce.LiquidBounce
      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.ui.font.Fonts
      import net.ccbluex.liquidbounce.utils.render.EaseUtils
      import net.ccbluex.liquidbounce.utils.render.RenderUtils
      import net.minecraft.util.ResourceLocation
      import org.lwjgl.opengl.GL11
      import java.awt.Color
      
      @ElementInfo(name = "Notifications")
      class Notifications(x: Double = 6.0, y: Double = 60.0, scale: Float = 1F,
                          side: Side = Side(Side.Horizontal.RIGHT, Side.Vertical.DOWN)) : Element(x, y, scale, side) {
      
          override fun drawElement(): Border? {
      
              LiquidBounce.hud.notifications.map { it }.forEachIndexed { index, notify ->
                  GL11.glPushMatrix()
                  if(notify.drawNotification(index)){
                      LiquidBounce.hud.notifications.remove(notify)
                  }
                  GL11.glPopMatrix()
              }
              if (mc.currentScreen is GuiHudDesigner) {
              }
              return null
          }
      }
      
      class Notification(val title: String, val content: String, val type: NotifyType, val time: Int=1500, val animeTime: Int=500) {
          val width=100.coerceAtLeast(Fonts.fontRegular38.getStringWidth(this.title)
                  .coerceAtLeast(Fonts.fontRegular38.getStringWidth(this.content)) + 20)
          val height=27
          var fadeState = FadeState.IN
          var nowY=-height
          var animeXTime=System.currentTimeMillis()
          var animeYTime=System.currentTimeMillis()
          val error = ResourceLocation("liquidbounce/notification/disable.png")
          val successful = ResourceLocation("liquidbounce/notification/enable.png")
      
          fun drawNotification(index: Int):Boolean {
              val realY=(-(index)*height*1.25).toInt()
              val nowTime=System.currentTimeMillis()
      
              if(nowY!=realY){
                  var pct=(nowTime-animeYTime)/animeTime.toDouble()
                  if(pct>1){
                      nowY=realY
                      pct=1.0
                  }else{
                      pct=EaseUtils.easeOutExpo(pct)
                  }
                  GL11.glTranslated(0.0,(realY-nowY)*pct,0.0)
              }else{
                  animeYTime=nowTime
              }
              GL11.glTranslated(0.0,nowY.toDouble(),0.0)
      
              var larissa=(nowTime-animeXTime)/animeTime.toDouble()
              when(fadeState){
                  FadeState.IN -> {
                      if(larissa>1){
                          fadeState=FadeState.STAY
                          animeXTime=nowTime
                          larissa=1.0
                      }
                      larissa=EaseUtils.easeOutExpo(larissa)
                  }
                  FadeState.STAY -> {
                      larissa=1.0
                      if((nowTime-animeXTime)>time){
                          fadeState=FadeState.OUT
                          animeXTime=nowTime
                      }
                  }
                  FadeState.OUT -> {
                      if(larissa>1){
                          fadeState=FadeState.END
                          animeXTime=nowTime
                          larissa=1.0
                      }
                      larissa=1-EaseUtils.easeInExpo(larissa)
                  }
                  FadeState.END -> {
                      return true
                  }
              }
              GL11.glTranslated(width-(width*larissa),0.0,0.0)
              GL11.glTranslatef(-width.toFloat(),0F,0F)
      
              if(type.renderColor == Color(0xFF2F2F)){
                  RenderUtils.drawCircleRect(-18F,0F,width.toFloat(),height.toFloat(),6f,Color(180,0,0,190).rgb,true)
                  RenderUtils.drawImage(error,-13,5,18,18)
                  Fonts.fontBold35.drawString(title,9F,17F,Color(255,255,255,255).rgb)
                  Fonts.fontBold40.drawString(content,9F,6F,Color(255,255,255,255).rgb)
              }else if(type.renderColor == Color(0x60E092)){
                  RenderUtils.drawCircleRect(-16F,0F,width.toFloat(),height.toFloat(),6f,Color(0,180,0,190).rgb,true)
                  RenderUtils.drawImage(successful,-13,5,18,18)
                  Fonts.fontBold35.drawString(title,9F,17F,Color(255,255,255,255).rgb)
                  Fonts.fontBold40.drawString(content,9F,6F,Color(255,255,255,255).rgb)
              }
              return false
          }
      }
      enum class NotifyType(var renderColor: Color) {
          SUCCESS(Color(0x60E092)),
          ERROR(Color(0xFF2F2F)),
      
      }
      
      enum class FadeState { IN, STAY, OUT, END }
      
      

      but it is not good to copy into the liquidbounceplus
      the assets and photos:
      D6EF1710-3DE8-476F-A7D6-756D08666F11.png CBEDE78F-B6B4-40F4-B3E0-83827AB90C96.jpeg 927189E0-06DD-4B2F-8902-FAB82C4DA1B9.png

      posted in Kotlin/Java
      Larissa
      Larissa