Skip to content

Commit

Permalink
Clean mode on and fixing things
Browse files Browse the repository at this point in the history
  • Loading branch information
opZywl committed Dec 9, 2023
1 parent d023650 commit a4f759a
Show file tree
Hide file tree
Showing 126 changed files with 431 additions and 2,122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
*/
package net.ccbluex.liquidbounce.features.module

import lombok.Getter
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.utils.normal.Main
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.utils.objects.Drag
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.utils.render.Scroll

enum class ModuleCategory(val displayName: String, val configName: String, val htmlIcon: String) {
COMBAT("%module.category.combat%", "Combat", ""),
PLAYER("%module.category.player%", "Player", ""),
Expand All @@ -19,26 +14,4 @@ enum class ModuleCategory(val displayName: String, val configName: String, val h
WORLD("%module.category.world%", "World", ""),
OTHER("%module.category.other%", "Other", ""),
EXPLOIT("%module.category.exploit%", "Exploit", "");

var namee: String? = null
var icon: String? = null
var posX = 0
var expanded = false

@Getter
val scroll: Scroll = Scroll()

@Getter
var drag: Drag? = null
var posY = 20

open fun ModuleCategory(name: String?) {
namee = name
icon = icon
posX = 40 + Main.categoryCount * 120
drag = Drag(posX.toFloat(), posY.toFloat())
expanded = true
Main.categoryCount++
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.features.value.*
import net.ccbluex.liquidbounce.ui.cape.GuiCapeManager.height
import net.ccbluex.liquidbounce.ui.client.gui.ClickGUIModule.colorBlueValue
import net.ccbluex.liquidbounce.ui.client.gui.ClickGUIModule.colorGreenValue
import net.ccbluex.liquidbounce.ui.client.gui.ClickGUIModule.colorRedValue
import net.ccbluex.liquidbounce.ui.clickgui.ClickGUIModule.colorBlueValue
import net.ccbluex.liquidbounce.ui.clickgui.ClickGUIModule.colorGreenValue
import net.ccbluex.liquidbounce.ui.clickgui.ClickGUIModule.colorRedValue
import net.ccbluex.liquidbounce.ui.client.hud.designer.GuiHudDesigner
import net.ccbluex.liquidbounce.utils.render.ColorUtils
import net.ccbluex.liquidbounce.utils.render.ColorUtils.rainbow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import net.ccbluex.liquidbounce.event.Render2DEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.font.FontLoaders
import net.ccbluex.liquidbounce.ui.font.FontLoaders
import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.render.Animation
import net.ccbluex.liquidbounce.utils.render.BlurUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package net.ccbluex.liquidbounce.features.module.modules.client.button

import net.ccbluex.liquidbounce.font.FontLoaders
import net.ccbluex.liquidbounce.ui.font.FontLoaders
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiButton
import java.awt.Color
Expand All @@ -16,7 +16,8 @@ abstract class AbstractButtonRenderer(protected val button: GuiButton) {
open fun drawButtonText(mc: Minecraft) {
FontLoaders.F18.DisplayFonts(
button.displayString,
button.xPosition + button.width / 2f - FontLoaders.F18.DisplayFontWidths(FontLoaders.F18,button.displayString) / 2f,
button.xPosition + button.width / 2f - FontLoaders.F18.DisplayFontWidths(
FontLoaders.F18,button.displayString) / 2f,
button.yPosition + button.height / 2f - FontLoaders.F18.height / 2f,
if (button.enabled) Color.WHITE.rgb else Color.GRAY.rgb,
FontLoaders.F18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
package net.ccbluex.liquidbounce.features.module.modules.client.button;

import net.ccbluex.liquidbounce.font.CFontRenderer;
import net.ccbluex.liquidbounce.font.FontLoaders;
import net.ccbluex.liquidbounce.ui.font.CFontRenderer;
import net.ccbluex.liquidbounce.ui.font.FontLoaders;
import net.ccbluex.liquidbounce.utils.render.RenderUtils;
import net.ccbluex.liquidbounce.utils.timer.MSTimer;
import net.minecraft.client.Minecraft;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ package net.ccbluex.liquidbounce.features.module.modules.client.button

import net.ccbluex.liquidbounce.utils.render.EaseUtils.easeInOutQuad
import net.ccbluex.liquidbounce.utils.render.RenderUtils
import net.ccbluex.liquidbounce.utils.render.shadowRenderUtils
import net.ccbluex.liquidbounce.font.FontLoaders
import net.ccbluex.liquidbounce.ui.font.FontLoaders
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiButton
import java.awt.Color
Expand Down Expand Up @@ -39,7 +38,8 @@ class WolframButtonRenderer(button: GuiButton) : AbstractButtonRenderer(button)
}
val percent = easeInOutQuad(animation)
if (button.enabled) {
val half = FontLoaders.F18.DisplayFontWidths(FontLoaders.F18,button.displayString) / 2.0
val half = FontLoaders.F18.DisplayFontWidths(
FontLoaders.F18,button.displayString) / 2.0
val center = button.xPosition + (button.width / 2.0)
RenderUtils.drawRect(
center - percent * half,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.handler.combat

import net.ccbluex.liquidbounce.FDPClient
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/net/ccbluex/liquidbounce/handler/macro/Macro.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.handler.macro

import net.ccbluex.liquidbounce.FDPClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.handler.macro

import net.ccbluex.liquidbounce.event.EventTarget
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.handler.network

import io.netty.bootstrap.ChannelFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import net.ccbluex.liquidbounce.FDPClient;
import net.ccbluex.liquidbounce.features.module.modules.client.HUD;
import net.ccbluex.liquidbounce.features.module.modules.client.ChatControl;
import net.ccbluex.liquidbounce.font.CFontRenderer;
import net.ccbluex.liquidbounce.font.FontLoaders;
import net.ccbluex.liquidbounce.ui.font.CFontRenderer;
import net.ccbluex.liquidbounce.ui.font.FontLoaders;
import net.ccbluex.liquidbounce.injection.access.StaticStorage;
import net.ccbluex.liquidbounce.utils.render.EaseUtils;
import net.ccbluex.liquidbounce.utils.render.RenderUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import net.ccbluex.liquidbounce.FDPClient;
import net.ccbluex.liquidbounce.features.module.modules.client.HUD;
import net.ccbluex.liquidbounce.font.FontLoaders;
import net.ccbluex.liquidbounce.ui.font.FontLoaders;
import net.ccbluex.liquidbounce.ui.client.GuiBackground;
import net.ccbluex.liquidbounce.utils.particles.ParticleUtils;
import net.minecraft.client.Minecraft;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.injection.transformers;

import net.ccbluex.liquidbounce.utils.ASMUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* FDPClient Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.injection.transformers;

import net.ccbluex.liquidbounce.utils.ASMUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge by LiquidBounce.
* https://github.com/SkidderMC/FDPClient/
*/
package net.ccbluex.liquidbounce.ui.client.gui
package net.ccbluex.liquidbounce.ui.clickgui

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.PacketEvent
Expand All @@ -14,14 +14,13 @@ import net.ccbluex.liquidbounce.features.value.BoolValue
import net.ccbluex.liquidbounce.features.value.FloatValue
import net.ccbluex.liquidbounce.features.value.IntegerValue
import net.ccbluex.liquidbounce.features.value.ListValue
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.ClickGui
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.*
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.Slight.SlightUI
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.dropdown.DropdownGUI
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.light.LightClickGUI
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.NewUi
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.novoline.ClickyUI
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.onetap.OtcClickGUi
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.*
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.Slight.SlightUI
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.classic.DropdownGUI
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.light.LightClickGUI
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.newVer.NewUi
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.novoline.ClickyUI
import net.ccbluex.liquidbounce.ui.clickgui.style.styles.onetap.OtcClickGUi
import net.ccbluex.liquidbounce.ui.client.gui.options.modernuiLaunchOption
import net.ccbluex.liquidbounce.utils.render.ColorUtils.rainbow
import net.minecraft.network.play.server.S2EPacketCloseWindow
Expand All @@ -32,7 +31,7 @@ import java.util.*
@ModuleInfo(name = "ClickGUI", category = ModuleCategory.CLIENT, keyBind = Keyboard.KEY_RSHIFT, canEnable = false)
object ClickGUIModule : Module() {

val styleValue: ListValue = object : ListValue(
private val styleValue: ListValue = object : ListValue(
"Style",
arrayOf(
"Classic",
Expand All @@ -41,7 +40,6 @@ object ClickGUIModule : Module() {
"Novoline",
"Astolfo",
"LB+",
"Jello",
"LiquidBounce",
"Tenacity5",
"Slight",
Expand All @@ -61,6 +59,9 @@ object ClickGUIModule : Module() {
val maxElementsValue = IntegerValue("MaxElements", 20, 1, 35)
val backgroundValue = ListValue("Background", arrayOf("Default", "Gradient", "None"), "None")
val animationValue = ListValue("Animation", arrayOf("Bread", "Slide", "LiquidBounce", "Zoom", "Ziul", "None"), "Ziul")
val animSpeedValue = FloatValue("AnimSpeed", 1f, 0.01f, 5f)
val gradStartValue = IntegerValue("GradientStartAlpha", 255, 0, 255)
val gradEndValue = IntegerValue("GradientEndAlpha", 0, 0, 255)
val colorRainbow = BoolValue("Rainbow", true)
val colorRedValue = IntegerValue("R", 0, 0, 255).displayable { !colorRainbow.get() } as IntegerValue
val colorGreenValue = IntegerValue("G", 160, 0, 255).displayable { !colorRainbow.get() } as IntegerValue
Expand Down Expand Up @@ -96,12 +97,12 @@ object ClickGUIModule : Module() {
"null" -> modernuiLaunchOption.clickGui.style = NullStyle()
"slowly" -> modernuiLaunchOption.clickGui.style = SlowlyStyle()
"black", "white" -> modernuiLaunchOption.clickGui.style = if (styleValue.get() == "White") WhiteStyle() else BlackStyle()
"jello" -> modernuiLaunchOption.clickGui.style = JelloStyle()
"tenacity5" -> modernuiLaunchOption.clickGui.style = TenacityStyle()
"astolfo" -> modernuiLaunchOption.clickGui.style = AstolfoStyle()
}
}

@JvmStatic
fun generateColor(): Color {
return if (colorRainbow.get()) {
rainbow()
Expand Down
Loading

0 comments on commit a4f759a

Please sign in to comment.