diff --git a/src/main/java/net/ccbluex/liquidbounce/FDPClient.kt b/src/main/java/net/ccbluex/liquidbounce/FDPClient.kt index 5d87e9e7da..6ea4e4b556 100644 --- a/src/main/java/net/ccbluex/liquidbounce/FDPClient.kt +++ b/src/main/java/net/ccbluex/liquidbounce/FDPClient.kt @@ -44,6 +44,7 @@ object FDPClient { const val COLORED_NAME = "§7[§b§lFDPClient§7] " const val CLIENT_CREATOR = "CCBlueX, Zywl & SkidderMC TEAM" const val CLIENT_WEBSITE = "https://fdpinfo.github.io" + const val CLIENT_DISCORD = "https://discord.gg/3XRFGeqEYD" const val CLIENT_VERSION = "v5.5.0" // Flags diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/Module.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/Module.kt index e03eb0b088..bb8b59019a 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/Module.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/Module.kt @@ -30,7 +30,7 @@ open class Module : MinecraftInstance(), Listenable { val animation: AnimationHelper var name: String private var suffix: String? = null - private val properties: List> = ArrayList>() + private val properties: List> = ArrayList() private var toggled = false var localizedName = "" get() = field.ifEmpty { name } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/ModuleCategory.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/ModuleCategory.kt index 4fb4e5bbc3..edf29afdf2 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/ModuleCategory.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/ModuleCategory.kt @@ -11,7 +11,6 @@ enum class ModuleCategory(val displayName: String, val configName: String, val h MOVEMENT("%module.category.movement%", "Movement", ""), VISUAL("%module.category.visual%", "Visual", ""), CLIENT("%module.category.client%", "Client", ""), - WORLD("%module.category.world%", "World", ""), OTHER("%module.category.other%", "Other", ""), EXPLOIT("%module.category.exploit%", "Exploit", ""); } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/ColorManager.java b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/ColorManager.java index c4c75ac1b1..0574b9c91e 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/ColorManager.java +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/ColorManager.java @@ -46,9 +46,6 @@ public void onRender2D(Render2DEvent render2DEvent) { public static final FloatValue rainbowBrightnessValue = new FloatValue("RainbowBrightness", 1f, 0f, 1f); public static final IntegerValue rainbowSpeedValue = new IntegerValue("RainbowSpeed", 1500, 500, 7000); - private float tempY = 65.0f; - private float tempHeight = 65.0f; - public static IntegerValue r = new IntegerValue("Red-1", 255, 0, 255); public static IntegerValue g = new IntegerValue("Green-1", 0, 0, 255); public static IntegerValue b = new IntegerValue("Blue-1", 84, 0, 255); @@ -179,16 +176,16 @@ public static void regenerateColors(boolean forceValue) { } public Color getColor1() { - final int red = this.red.get(), - green = this.green.get(), - blue = this.blue.get(); + final int red = ColorManager.red.get(), + green = ColorManager.green.get(), + blue = ColorManager.blue.get(); return new Color(red, green, blue); } public Color getColor2() { - final int red = this.red2.get(), - green = this.green2.get(), - blue = this.blue2.get(); + final int red = red2.get(), + green = green2.get(), + blue = blue2.get(); return new Color(red, green, blue); } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/Rotations.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/Rotations.kt index a4d5b18653..5bc4d2b8bc 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/Rotations.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/Rotations.kt @@ -16,9 +16,9 @@ import net.ccbluex.liquidbounce.features.module.ModuleInfo import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura import net.ccbluex.liquidbounce.features.module.modules.exploit.Disabler import net.ccbluex.liquidbounce.features.module.modules.movement.Flight -import net.ccbluex.liquidbounce.features.module.modules.world.Breaker -import net.ccbluex.liquidbounce.features.module.modules.world.ChestAura -import net.ccbluex.liquidbounce.features.module.modules.world.Scaffold +import net.ccbluex.liquidbounce.features.module.modules.other.Breaker +import net.ccbluex.liquidbounce.features.module.modules.player.ChestAura +import net.ccbluex.liquidbounce.features.module.modules.movement.Scaffold import net.ccbluex.liquidbounce.utils.RotationUtils import net.ccbluex.liquidbounce.value.BoolValue import net.ccbluex.liquidbounce.value.FloatValue diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/KillAura.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/KillAura.kt index 011c26a0af..bbddfc6825 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/KillAura.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/KillAura.kt @@ -15,7 +15,7 @@ import net.ccbluex.liquidbounce.features.module.modules.movement.StrafeFix import net.ccbluex.liquidbounce.features.module.modules.movement.TargetStrafe import net.ccbluex.liquidbounce.features.module.modules.player.Blink import net.ccbluex.liquidbounce.features.module.modules.visual.FreeCam -import net.ccbluex.liquidbounce.features.module.modules.world.Scaffold +import net.ccbluex.liquidbounce.features.module.modules.movement.Scaffold import net.ccbluex.liquidbounce.handler.protocol.ProtocolBase import net.ccbluex.liquidbounce.ui.font.Fonts import net.ccbluex.liquidbounce.value.* @@ -25,7 +25,6 @@ import net.ccbluex.liquidbounce.utils.extensions.hitBox import net.ccbluex.liquidbounce.utils.extensions.rayTraceWithServerSideRotation import net.ccbluex.liquidbounce.utils.misc.RandomUtils import net.ccbluex.liquidbounce.utils.BlinkUtils -import net.ccbluex.liquidbounce.utils.extensions.eyes import net.ccbluex.liquidbounce.utils.timer.MSTimer import net.ccbluex.liquidbounce.utils.timer.TimeUtils import net.minecraft.client.gui.ScaledResolution @@ -138,7 +137,6 @@ object KillAura : Module() { private val targetModeValue = ListValue("TargetMode", arrayOf("Single", "Switch", "Multi"), "Switch").displayable { modeDisplay.get() } private val switchDelayValue = IntegerValue("SwitchDelay", 15, 1, 2000).displayable { targetModeValue.equals("Switch") && modeDisplay.get() } private val limitedMultiTargetsValue = IntegerValue("LimitedMultiTargets", 0, 0, 50).displayable { targetModeValue.equals("Multi") && modeDisplay.get() } - private val reachMode = ListValue("CheckTargetDistance", arrayOf("Old", "New"), "New") // AutoBlock private val autoblockDisplay = BoolValue("AutoBlock Settings:", true) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/Grim117.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/Grim117.kt new file mode 100644 index 0000000000..3552e0227f --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/Grim117.kt @@ -0,0 +1,36 @@ +/* + * 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.features.module.modules.combat.velocitys.grim + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.combat.velocitys.VelocityMode +import net.minecraft.network.play.client.C03PacketPlayer +import net.minecraft.network.play.client.C07PacketPlayerDigging +import net.minecraft.util.EnumFacing + +class Grim117 : VelocityMode("Grim1.17") { + + private var velocityInput = false + override fun onPacket(event: PacketEvent) { + mc.netHandler.addToSendQueue( + C03PacketPlayer.C06PacketPlayerPosLook( + mc.thePlayer.posX, + mc.thePlayer.posY, + mc.thePlayer.posZ, + mc.thePlayer.rotationYaw, + mc.thePlayer.rotationPitch, + mc.thePlayer.onGround + ) + ) + mc.netHandler.addToSendQueue( + C07PacketPlayerDigging( + C07PacketPlayerDigging.Action.STOP_DESTROY_BLOCK,mc.thePlayer.position, + EnumFacing.DOWN) + ) + velocityInput = false + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimDamage.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimDamage.kt new file mode 100644 index 0000000000..2ab36b9888 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimDamage.kt @@ -0,0 +1,35 @@ +/* + * 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.features.module.modules.combat.velocitys.grim + +import net.ccbluex.liquidbounce.FDPClient +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.combat.velocitys.VelocityMode +import net.minecraft.network.play.client.C02PacketUseEntity +import net.minecraft.network.play.client.C0APacketAnimation + +class GrimDamage : VelocityMode("GrimDamage") { + + private var velocityInput = false + override fun onPacket(event: PacketEvent) { + if (velocityInput) { + val target = FDPClient.combatManager.getNearByEntity(3f) + repeat(12) { + mc.thePlayer.sendQueue.addToSendQueue( + C02PacketUseEntity( + target, + C02PacketUseEntity.Action.ATTACK + ) + ) + mc.thePlayer.sendQueue.addToSendQueue(C0APacketAnimation()) + } + mc.thePlayer.motionX *= 0.077760000 + mc.thePlayer.motionZ *= 0.077760000 + velocityInput = false + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity.kt index 105d10c93a..2e5cf627ef 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity.kt @@ -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.features.module.modules.combat.velocitys.grim import net.ccbluex.liquidbounce.event.PacketEvent @@ -7,10 +12,10 @@ import net.minecraft.network.play.server.S12PacketEntityVelocity import net.minecraft.network.play.server.S32PacketConfirmTransaction class GrimVelocity : VelocityMode("Grim") { - var cancelPacket = 6 - var resetPersec = 8 - var grimTCancel = 0 - var updates = 0 + private var cancelPacket = 6 + private var resetPersec = 8 + private var grimTCancel = 0 + private var updates = 0 override fun onEnable() { grimTCancel = 0 diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity2.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity2.kt index 1fe62c2f1b..9b313110d3 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity2.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/grim/GrimVelocity2.kt @@ -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.features.module.modules.combat.velocitys.grim import net.ccbluex.liquidbounce.event.* @@ -26,8 +31,8 @@ class GrimVelocity2 : VelocityMode("GrimC07") { private val flagPauseValue = IntegerValue("FlagPause-Time", 50, 0, 5000) - var gotVelo = false - var flagTimer = MSTimer() + private var gotVelo = false + private var flagTimer = MSTimer() override fun onEnable() { gotVelo = false @@ -69,7 +74,7 @@ class GrimVelocity2 : VelocityMode("GrimC07") { } } - fun checkBlock(pos: BlockPos): Boolean { + private fun checkBlock(pos: BlockPos): Boolean { if (!onlyAirValue.get() || mc.theWorld.isAirBlock(pos)) { if (sendC03Value.get()) { if (C06Value.get()) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/intave/IntaveVelocity.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/intave/IntaveVelocity.kt new file mode 100644 index 0000000000..7391e4c98a --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/intave/IntaveVelocity.kt @@ -0,0 +1,25 @@ +/* + * 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.features.module.modules.combat.velocitys.intave + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.combat.velocitys.VelocityMode +import net.minecraft.client.settings.GameSettings +class IntaveVelocity : VelocityMode("Intave") { + + private var jumped = 0 + override fun onPacket(event: PacketEvent) { + if (mc.thePlayer.hurtTime == 9) { + if (++jumped % 2 == 0 && mc.thePlayer.onGround && mc.thePlayer.isSprinting && mc.currentScreen == null) { + mc.gameSettings.keyBindJump.pressed = true + jumped = 0 // reset + } + } else { + mc.gameSettings.keyBindJump.pressed = GameSettings.isKeyDown(mc.gameSettings.keyBindJump) + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/other/JumpReset.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/other/JumpReset.kt new file mode 100644 index 0000000000..7e2ce1a2a7 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/velocitys/other/JumpReset.kt @@ -0,0 +1,31 @@ +/* + * 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.features.module.modules.combat.velocitys.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.combat.velocitys.VelocityMode + +class JumpReset : VelocityMode("JumpReset") { + private var start = 0 + override fun onPacket(event: PacketEvent) { + while (mc.thePlayer.hurtTime >= 8) { + mc.gameSettings.keyBindJump.pressed = true + break + } + while (mc.thePlayer.hurtTime >= 7 && !mc.gameSettings.keyBindForward.pressed) { + mc.gameSettings.keyBindForward.pressed = true + start = 1 + break + } + if (mc.thePlayer.hurtTime in 1..6) { + mc.gameSettings.keyBindJump.pressed = false + if (start == 1) { + mc.gameSettings.keyBindForward.pressed = false + start = 0 + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/LightningDetect.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/LightningDetect.kt similarity index 94% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/LightningDetect.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/LightningDetect.kt index e99a0ea2b7..3bfaf0dbd4 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/LightningDetect.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/LightningDetect.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.exploit import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.EventTarget @@ -18,7 +18,7 @@ import net.ccbluex.liquidbounce.value.BoolValue import net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity import java.text.DecimalFormat -@ModuleInfo(name = "LightningDetect", category = ModuleCategory.WORLD, array = false, defaultOn = true) +@ModuleInfo(name = "LightningDetect", category = ModuleCategory.EXPLOIT, array = false, defaultOn = true) object LightningDetect : Module() { private val debugValue = BoolValue("debug", false) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/grim/GrimPlaceDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/grim/GrimPlaceDisabler.kt new file mode 100644 index 0000000000..6a0eeaa518 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/grim/GrimPlaceDisabler.kt @@ -0,0 +1,63 @@ +/* + * 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.features.module.modules.exploit.disablers.grim + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.value.BoolValue +import net.minecraft.network.Packet +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement +import net.minecraft.network.play.client.C0BPacketEntityAction +import net.minecraft.network.play.client.C0EPacketClickWindow +import java.util.concurrent.LinkedBlockingQueue + +class GrimPlaceDisabler : DisablerMode("Grim Place") { + private val packetsG = LinkedBlockingQueue>() + private var pre = false + private val c0e = BoolValue("ChestStealer", true) + private val c08 = BoolValue("PlaceBlock", true) + private val c0b = BoolValue("C0B", true) + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + + /* pre = event.eventState == EventState.PRE + if (event.eventState == EventState.PRE) { + try { + while (!packetsG.isEmpty()) { + mc.netHandler!!.addToSendQueue(packetsG.take()) + disabler.debugMessage("expensive bypasses") + } + } catch (e: Exception) { + e.printStackTrace() + } + } + + */ + if (packet is C0EPacketClickWindow && c0e.get()) { + if (!pre) { + event.cancelEvent() + packetsG.add(packet) + disabler.debugMessage("CEMonkey") + } + } + if (packet is C0BPacketEntityAction && c0b.get()) { + if (!pre) { + event.cancelEvent() + packetsG.add(packet) + disabler.debugMessage("BBMonkey") + } + } + if (packet is C08PacketPlayerBlockPlacement && c08.get()) { + if (!pre) { + event.cancelEvent() + packetsG.add(packet) + disabler.debugMessage("GreatBarrierLeef") + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/BlockPlacementDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/BlockPlacementDisabler.kt new file mode 100644 index 0000000000..8b93a80f7b --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/BlockPlacementDisabler.kt @@ -0,0 +1,28 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement +import net.minecraft.util.BlockPos +class BlockPlacementDisabler : DisablerMode("BlockPlacement") { + + override fun onPacket(event: PacketEvent) { + PacketUtils.sendPacketNoEvent( + C08PacketPlayerBlockPlacement( + BlockPos(Double.NaN, Double.NaN, Double.NaN), + 1, + null, + 0f, + 0f, + 0f + ) + ) + disabler.debugMessage("BlockPlacement") + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/FlagDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/FlagDisabler.kt new file mode 100644 index 0000000000..46a870e374 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/FlagDisabler.kt @@ -0,0 +1,61 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.ccbluex.liquidbounce.value.BoolValue +import net.ccbluex.liquidbounce.value.IntegerValue +import net.ccbluex.liquidbounce.value.ListValue +import net.minecraft.network.play.client.C03PacketPlayer +import net.minecraft.network.play.server.S08PacketPlayerPosLook +import kotlin.math.sqrt + +class FlagDisabler : DisablerMode("Flag") { + + private val flagMode = ListValue("Flag-Mode", arrayOf("Edit", "Packet"), "Edit") + private val flagTick = IntegerValue("Flag-TickDelay", 25, 1, 200) + private val flagSilent = BoolValue("Flag-SilentMode", false) + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C03PacketPlayer && flagMode.get().equals( + "edit", + true + ) && mc.thePlayer.ticksExisted > 0 && mc.thePlayer.ticksExisted % flagTick.get() == 0 + ) { + packet.isMoving = false + packet.onGround = false + packet.y = -0.08 + + disabler.debugMessage("flagged") + } + if (packet is S08PacketPlayerPosLook && flagSilent.get()) { + if (mc.thePlayer == null || mc.thePlayer.ticksExisted <= 0) return + + val x = packet.getX() - mc.thePlayer.posX + val y = packet.getY() - mc.thePlayer.posY + val z = packet.getZ() - mc.thePlayer.posZ + val diff = sqrt(x * x + y * y + z * z) + if (diff <= 8) { + event.cancelEvent() + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C06PacketPlayerPosLook( + packet.getX(), + packet.getY(), + packet.getZ(), + packet.getYaw(), + packet.getPitch(), + true + ) + ) + + disabler.debugMessage("silent s08 accept") + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/InputDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/InputDisabler.kt new file mode 100644 index 0000000000..9b124573da --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/InputDisabler.kt @@ -0,0 +1,19 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.play.client.C0CPacketInput + +class InputDisabler : DisablerMode("Input") { + override fun onPacket(event: PacketEvent) { + PacketUtils.sendPacketNoEvent(C0CPacketInput(0.98f, 0f, true, true)) + disabler.debugMessage("input") + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/NoSwingDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/NoSwingDisabler.kt new file mode 100644 index 0000000000..f3d1dcd270 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/NoSwingDisabler.kt @@ -0,0 +1,21 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.minecraft.network.play.client.C0APacketAnimation +class NoSwingDisabler : DisablerMode("noSwing") { + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C0APacketAnimation) { + event.cancelEvent() + disabler.debugMessage("cancelled c0a") + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/PayLoadDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/PayLoadDisabler.kt new file mode 100644 index 0000000000..06ecd9f067 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/PayLoadDisabler.kt @@ -0,0 +1,24 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import io.netty.buffer.Unpooled +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.PacketBuffer +import net.minecraft.network.play.client.C17PacketCustomPayload +class PayLoadDisabler : DisablerMode("Payload") { + override fun onPacket(event: PacketEvent) { + PacketUtils.sendPacketNoEvent( + C17PacketCustomPayload( + "40413eb1", + PacketBuffer(Unpooled.wrappedBuffer(byteArrayOf(8, 52, 48, 52, 49, 51, 101, 98, 49))) + ) + ) + disabler.debugMessage("funny") + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/ShotBowDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/ShotBowDisabler.kt new file mode 100644 index 0000000000..225b8d147f --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/ShotBowDisabler.kt @@ -0,0 +1,63 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.play.client.C03PacketPlayer +import net.minecraft.network.play.client.C0DPacketCloseWindow +import net.minecraft.network.play.server.S08PacketPlayerPosLook +import kotlin.math.sqrt +class ShotBowDisabler : DisablerMode("Shot BowD") { + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C0DPacketCloseWindow) { + event.cancelEvent() + disabler.debugMessage("Activated Disabler!") + } + if (packet is C03PacketPlayer) + packet.onGround = true + if (packet is S08PacketPlayerPosLook) { + if (mc.thePlayer == null || mc.thePlayer.ticksExisted <= 0) return + val x = packet.getX() - mc.thePlayer.posX + val y = packet.getY() - mc.thePlayer.posY + val z = packet.getZ() - mc.thePlayer.posZ + val diff = sqrt(x * x + y * y + z * z) + if (diff <= 20) { + event.cancelEvent() + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C06PacketPlayerPosLook( + packet.x, + packet.y, + packet.z, + packet.yaw, + packet.pitch, + true + ) + ) + disabler.debugMessage("modified c06") + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C04PacketPlayerPosition( + mc.thePlayer.posX, + mc.thePlayer.posY + 0.2, + mc.thePlayer.posZ, + false + ) + ) + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C04PacketPlayerPosition( + mc.thePlayer.posX, + mc.thePlayer.posY, + mc.thePlayer.posZ, + true + ) + ) + disabler.debugMessage("cancel c04") + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentAcceptDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentAcceptDisabler.kt new file mode 100644 index 0000000000..68ef9b7199 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentAcceptDisabler.kt @@ -0,0 +1,93 @@ +/* + * 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.features.module.modules.exploit.disablers.other + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.play.client.C03PacketPlayer +import net.minecraft.network.play.client.C0FPacketConfirmTransaction +import net.minecraft.network.play.server.S08PacketPlayerPosLook +import java.util.* +import kotlin.math.round +import kotlin.math.sqrt +class SilentAcceptDisabler : DisablerMode("Silent Accept") { + + private fun isInventory(action: Short): Boolean = action in 1..99 + private val packetQueue = LinkedList() + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C03PacketPlayer) { + val yPos = round(mc.thePlayer.posY / 0.015625) * 0.015625 + mc.thePlayer.setPosition(mc.thePlayer.posX, yPos, mc.thePlayer.posZ) + + if (mc.thePlayer.ticksExisted % 45 == 0) { + disabler.debugMessage("flag") + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C04PacketPlayerPosition( + mc.thePlayer.posX, + mc.thePlayer.posY, + mc.thePlayer.posZ, + true + ) + ) + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C04PacketPlayerPosition( + mc.thePlayer.posX, + mc.thePlayer.posY - 11.725, + mc.thePlayer.posZ, + false + ) + ) + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C04PacketPlayerPosition( + mc.thePlayer.posX, + mc.thePlayer.posY, + mc.thePlayer.posZ, + true + ) + ) + } + } + + if (packet is S08PacketPlayerPosLook) { + if (mc.thePlayer == null || mc.thePlayer.ticksExisted <= 0) return + + val x = packet.getX() - mc.thePlayer.posX + val y = packet.getY() - mc.thePlayer.posY + val z = packet.getZ() - mc.thePlayer.posZ + val diff = sqrt(x * x + y * y + z * z) + if (diff <= 8) { + event.cancelEvent() + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C06PacketPlayerPosLook( + packet.getX(), + packet.getY(), + packet.getZ(), + packet.getYaw(), + packet.getPitch(), + true + ) + ) + + disabler.debugMessage("silent s08 accept") + } + } + + if (packet is C0FPacketConfirmTransaction && !isInventory(packet.uid)) { + repeat(4) { + packetQueue.add(packet) + } + event.cancelEvent() + disabler.debugMessage("c0f dupe: 4x") + } + } + + override fun onDisable() { + packetQueue.clear() + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentActionBypassDisabler.java b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentActionBypassDisabler.java new file mode 100644 index 0000000000..74e12112e3 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/other/SilentActionBypassDisabler.java @@ -0,0 +1,53 @@ +/* + * 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.features.module.modules.exploit.disablers.other; + +import net.ccbluex.liquidbounce.event.PacketEvent; +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode; +import net.ccbluex.liquidbounce.value.BoolValue; +import net.minecraft.network.play.client.C0BPacketEntityAction; + +public final class SilentActionBypassDisabler extends DisablerMode { + + public SilentActionBypassDisabler() { + super("Silent Sprint/Sneak"); + } + private final BoolValue startSprint = new BoolValue("Start sprinting", true); + private final BoolValue stopSprinting = new BoolValue("Stop sprinting", true); + private final BoolValue startSneaking = new BoolValue("Start sneaking", true); + private final BoolValue stopSneaking = new BoolValue("Stop sneaking", true); + @Override + public void onPacket(final PacketEvent event) { + if (event.getPacket() instanceof C0BPacketEntityAction) { + switch (((C0BPacketEntityAction) event.getPacket()).getAction()) { + case START_SPRINTING: + if (startSprint.equals("start sprinting")) { + getDisabler().debugMessage("Cancelled start sprinting packet."); + event.cancelEvent(); + } + break; + case STOP_SPRINTING: + if (stopSprinting.equals("stop sprinting")) { + getDisabler().debugMessage("Cancelled stop sprinting packet."); + event.cancelEvent(); + } + break; + case START_SNEAKING: + if (startSneaking.equals("start sneaking")) { + getDisabler().debugMessage("Cancelled start sneaking packet."); + event.cancelEvent(); + } + break; + case STOP_SNEAKING: + if (stopSneaking.equals("stop sneaking")) { + getDisabler().debugMessage("Cancelled stop sneaking packet."); + event.cancelEvent(); + } + break; + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/server/mushmc/MushMCDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/server/mushmc/MushMCDisabler.kt new file mode 100644 index 0000000000..a520b0700d --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/server/mushmc/MushMCDisabler.kt @@ -0,0 +1,24 @@ +/* + * 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.features.module.modules.exploit.disablers.server.mushmc + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.minecraft.network.play.client.C0APacketAnimation +import net.minecraft.network.play.client.C16PacketClientStatus +import net.minecraft.network.play.server.S3EPacketTeams +import net.minecraft.network.play.server.S42PacketCombatEvent + +class MushMCDisabler : DisablerMode("MushMC") { + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C16PacketClientStatus || packet is C0APacketAnimation || packet is S42PacketCombatEvent || packet is S3EPacketTeams) { + event.cancelEvent() + disabler.debugMessage("funny packet") + } + mc.thePlayer.capabilities.isCreativeMode = true + } + } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/spartan/SpartanCombatDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/spartan/SpartanCombatDisabler.kt new file mode 100644 index 0000000000..5e39a50f69 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/spartan/SpartanCombatDisabler.kt @@ -0,0 +1,44 @@ +/* + * 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.features.module.modules.exploit.disablers.spartan + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.ccbluex.liquidbounce.utils.timer.MSTimer +import net.minecraft.network.play.client.C00PacketKeepAlive +import net.minecraft.network.play.client.C0FPacketConfirmTransaction +class SpartanCombatDisabler : DisablerMode("SpartanCombat") { + + private val msTimer = MSTimer() + + private val keepAlives = arrayListOf() + private val transactions = arrayListOf() + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (msTimer.hasTimePassed(3000L) && keepAlives.size > 0 && transactions.size > 0) { + PacketUtils.sendPacketNoEvent(keepAlives[keepAlives.size - 1]) + PacketUtils.sendPacketNoEvent(transactions[transactions.size - 1]) + disabler.debugMessage("c00 no.${keepAlives.size - 1} sent.") + disabler.debugMessage("c0f no.${transactions.size - 1} sent.") + keepAlives.clear() + transactions.clear() + msTimer.reset() + } + if (packet is C00PacketKeepAlive && (keepAlives.size <= 0 || packet != keepAlives[keepAlives.size - 1])) { + disabler.debugMessage("c00 added") + keepAlives.add(packet) + event.cancelEvent() + } + if (packet is C0FPacketConfirmTransaction && (transactions.size <= 0 || packet != transactions[transactions.size - 1])) { + disabler.debugMessage("c0f added") + transactions.add(packet) + event.cancelEvent() + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/NewVerusSemiDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/NewVerusSemiDisabler.kt new file mode 100644 index 0000000000..986dc176da --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/NewVerusSemiDisabler.kt @@ -0,0 +1,88 @@ +/* + * 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.features.module.modules.exploit.disablers.verus + +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.ccbluex.liquidbounce.value.BoolValue +import net.minecraft.init.Items +import net.minecraft.network.Packet +import net.minecraft.network.play.INetHandlerPlayServer +import net.minecraft.network.play.client.* +import net.minecraft.network.play.server.S08PacketPlayerPosLook + +import java.util.* + +class NewVerusSemiDisabler : DisablerMode("Verus-Semi2") { + + private val verusLobbyValue = BoolValue("LobbyCheck", false) + private val queueBus = LinkedList>() + + private fun shouldRun(): Boolean = + mc.thePlayer != null && mc.thePlayer.inventory != null && (!verusLobbyValue.get() || !mc.thePlayer.inventory.hasItem( + Items.compass + )) && mc.thePlayer.ticksExisted > 5 + + private fun isInventory(action: Short): Boolean = action in 1..99 + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (!shouldRun()) { + queueBus.clear() + return + } + + if (packet is C0BPacketEntityAction) { + event.cancelEvent() + disabler.debugMessage("cancel action") + } + + if (packet is S08PacketPlayerPosLook) { + if (mc.thePlayer.getDistance(packet.x, packet.y, packet.z) < 8) { + PacketUtils.sendPacketNoEvent( + C03PacketPlayer.C06PacketPlayerPosLook( + packet.x, + packet.y, + packet.z, + packet.yaw, + packet.pitch, + false + ) + ) + event.cancelEvent() + disabler.debugMessage("silent flag") + } + } + + if (packet is C00PacketKeepAlive || (packet is C0FPacketConfirmTransaction && !isInventory(packet.uid))) { + queueBus.add(packet as Packet) + event.cancelEvent() + + disabler.debugMessage("c0f or c00, ${queueBus.size}") + + if (queueBus.size > 300) { + PacketUtils.sendPacketNoEvent(queueBus.poll()) + disabler.debugMessage("poll") + } + } + + if (packet is C03PacketPlayer) { + if (mc.thePlayer.ticksExisted % 20 == 0) { + PacketUtils.sendPacketNoEvent(C0CPacketInput(0.98f, 0.98f, false, false)) + disabler.debugMessage("c18 and c0c") + } + + if (mc.thePlayer.ticksExisted % 45 == 0) { + packet.y = -0.015625 + packet.onGround = false + packet.isMoving = false + disabler.debugMessage("flag packet") + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/OldVerusDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/OldVerusDisabler.kt index 64c23913c7..92a7f5cb54 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/OldVerusDisabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/OldVerusDisabler.kt @@ -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.features.module.modules.exploit.disablers.verus import net.ccbluex.liquidbounce.FDPClient diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusCustomDisabler.java b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusCustomDisabler.java new file mode 100644 index 0000000000..f1c6a72397 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusCustomDisabler.java @@ -0,0 +1,84 @@ +/* + * 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.features.module.modules.exploit.disablers.verus; + +import net.ccbluex.liquidbounce.event.EventTarget; +import net.ccbluex.liquidbounce.event.MoveEvent; +import net.ccbluex.liquidbounce.event.PacketEvent; +import net.ccbluex.liquidbounce.event.WorldEvent; +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode; +import net.ccbluex.liquidbounce.utils.PacketUtils; +import net.ccbluex.liquidbounce.value.BoolValue; +import net.minecraft.network.Packet; +import net.minecraft.network.play.client.C03PacketPlayer; +import net.minecraft.network.play.client.C0BPacketEntityAction; + +import java.util.concurrent.ConcurrentLinkedQueue; + +public final class VerusCustomDisabler extends DisablerMode { + public VerusCustomDisabler() { + super("VerusCustomDisabler"); + } + + private final BoolValue movementDisabler = new BoolValue("Movement", false); + private final BoolValue sprintDisabler = new BoolValue("Sprint", false); + + private final ConcurrentLinkedQueue> transactions = new ConcurrentLinkedQueue<>(); + private final ConcurrentLinkedQueue> keepAlives = new ConcurrentLinkedQueue<>(); + + private boolean teleported; + + @EventTarget + public void onMove(final MoveEvent event) { + if (movementDisabler.getValue()) { + if (mc.thePlayer.ticksExisted % 100 == 0) { + PacketUtils.sendPacketNoEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround)); + PacketUtils.sendPacketNoEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, -0.015625, mc.thePlayer.posZ, false)); + PacketUtils.sendPacketNoEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround)); + + teleported = true; + } + } + + if (sprintDisabler.getValue()) { + PacketUtils.sendPacketNoEvent(new C0BPacketEntityAction(mc.thePlayer, + mc.thePlayer.ticksExisted % 2 == 0 ? C0BPacketEntityAction.Action.STOP_SPRINTING : + C0BPacketEntityAction.Action.START_SPRINTING)); + } + } + + @EventTarget + public void onPacket(final PacketEvent event) { + final Packet packet = event.getPacket(); + + if (sprintDisabler.getValue() && packet instanceof C0BPacketEntityAction) { + C0BPacketEntityAction c0b = ((C0BPacketEntityAction) packet); + + if (c0b.getAction() == C0BPacketEntityAction.Action.START_SPRINTING || + c0b.getAction() == C0BPacketEntityAction.Action.STOP_SPRINTING) { + event.cancelEvent(); + } + } + } + + @EventTarget + public void onWorld(final MoveEvent event) { + if (movementDisabler.getValue()) { + if (teleported) { + event.cancelEvent(); + } + + teleported = false; + } + } + + @Override + public void onWorld(final WorldEvent event) { + transactions.clear(); + keepAlives.clear(); + teleported = false; + }; +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFixDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFixDisabler.kt index 65935d9a66..9f5d70e54c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFixDisabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFixDisabler.kt @@ -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.features.module.modules.exploit.disablers.verus import net.ccbluex.liquidbounce.event.PacketEvent @@ -22,7 +27,7 @@ class VerusFixDisabler : DisablerMode("VerusFix") { var z = 0.0 var pitch = 0.0 var yaw = 0.0 - var prevSlot = 0 + private var prevSlot = 0 private var jam = 0 private var packetCount = 0 diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFlyDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFlyDisabler.kt new file mode 100644 index 0000000000..d90fc202b3 --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusFlyDisabler.kt @@ -0,0 +1,38 @@ +/* + * 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.features.module.modules.exploit.disablers.verus + +import net.minecraft.network.play.client.C03PacketPlayer +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode + +class VerusFlyDisabler : DisablerMode("Verus-Fly") { + + private var packetCount = 0 + + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C03PacketPlayer) { + if (mc.thePlayer.motionY == 0.0 || mc.thePlayer.onGround || mc.thePlayer.isCollidedVertically) { + packet.onGround = true + disabler.debugMessage("fix ground") + } + } + if (packet is C03PacketPlayer) { + if (packet !is C03PacketPlayer.C04PacketPlayerPosition && packet !is C03PacketPlayer.C05PacketPlayerLook && packet !is C03PacketPlayer.C06PacketPlayerPosLook) { + packetCount++ + if (packetCount >= 2) { + event.cancelEvent() + disabler.debugMessage("cancel nigga 2") + } + } else { + packetCount = 0 + disabler.debugMessage("set 0") + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusScaffoldDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusScaffoldDisabler.kt new file mode 100644 index 0000000000..fe635d5bff --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusScaffoldDisabler.kt @@ -0,0 +1,31 @@ +/* + * 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.features.module.modules.exploit.disablers.verus + +import net.ccbluex.liquidbounce.event.EventTarget +import net.ccbluex.liquidbounce.event.PacketEvent +import net.ccbluex.liquidbounce.features.module.modules.exploit.disablers.DisablerMode +import net.ccbluex.liquidbounce.utils.PacketUtils +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement + +class VerusScaffoldDisabler : DisablerMode("VerusScaffold") { + @EventTarget + override fun onPacket(event: PacketEvent) { + val packet = event.packet + if (packet is C08PacketPlayerBlockPlacement) { + event.cancelEvent() + PacketUtils.sendPacketNoEvent( + C08PacketPlayerBlockPlacement( + packet.position, + packet.placedBlockDirection, + null, + packet.placedBlockOffsetX, + packet.placedBlockOffsetY, + packet.placedBlockOffsetZ)) + } + } + +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusSemiDisabler.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusSemiDisabler.kt index 2b00ec3c8c..7434dd9ce7 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusSemiDisabler.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/disablers/verus/VerusSemiDisabler.kt @@ -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.features.module.modules.exploit.disablers.verus import net.ccbluex.liquidbounce.event.PacketEvent diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastBreak.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/FastBreak.kt similarity index 82% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastBreak.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/FastBreak.kt index 84bd7b4965..ddeda5d9c4 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastBreak.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/FastBreak.kt @@ -3,16 +3,17 @@ * 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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.movement import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.UpdateEvent 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.features.module.modules.other.Breaker import net.ccbluex.liquidbounce.value.FloatValue -@ModuleInfo(name = "FastBreak", category = ModuleCategory.WORLD) +@ModuleInfo(name = "FastBreak", category = ModuleCategory.MOVEMENT) object FastBreak : Module() { private val breakDamageValue = FloatValue("BreakDamage", 0.8F, 0.1F, 1F) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/NoSlowBreak.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlowBreak.kt similarity index 79% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/NoSlowBreak.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlowBreak.kt index c98c595cad..39a7559941 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/NoSlowBreak.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlowBreak.kt @@ -3,14 +3,14 @@ * 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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.movement 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.value.BoolValue -@ModuleInfo(name = "NoSlowBreak", category = ModuleCategory.WORLD) +@ModuleInfo(name = "NoSlowBreak", category = ModuleCategory.MOVEMENT) object NoSlowBreak : Module() { val airValue = BoolValue("Air", true) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Scaffold.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Scaffold.kt similarity index 99% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Scaffold.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Scaffold.kt index d4a786e286..c8a23bff57 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Scaffold.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Scaffold.kt @@ -3,15 +3,13 @@ * 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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.movement import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.* 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.features.module.modules.movement.Speed -import net.ccbluex.liquidbounce.features.module.modules.movement.StrafeFix import net.ccbluex.liquidbounce.injection.access.StaticStorage import net.ccbluex.liquidbounce.ui.i18n.LanguageManager import net.ccbluex.liquidbounce.utils.* @@ -50,7 +48,7 @@ import org.lwjgl.input.Keyboard import java.awt.Color import kotlin.math.* -@ModuleInfo(name = "Scaffold", category = ModuleCategory.WORLD, keyBind = Keyboard.KEY_V) +@ModuleInfo(name = "Scaffold", category = ModuleCategory.MOVEMENT, keyBind = Keyboard.KEY_V) class Scaffold : Module() { // Block place diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/SpeedMine.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/SpeedMine.kt similarity index 95% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/SpeedMine.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/SpeedMine.kt index 13835eb0cb..7f1cd112af 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/SpeedMine.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/SpeedMine.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.movement import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.MotionEvent @@ -18,7 +18,7 @@ import net.minecraft.network.play.client.C07PacketPlayerDigging import net.minecraft.util.BlockPos import net.minecraft.util.EnumFacing -@ModuleInfo(name = "SpeedMine", category = ModuleCategory.WORLD) +@ModuleInfo(name = "SpeedMine", category = ModuleCategory.MOVEMENT) object SpeedMine : Module() { private val speedValue = FloatValue("Speed", 1.5f, 1f, 3f) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Timer.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Timer.kt similarity index 93% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Timer.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Timer.kt index 28caac8bc8..ecdfdf0a2c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Timer.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/Timer.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.movement import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.UpdateEvent @@ -17,7 +17,7 @@ import net.ccbluex.liquidbounce.utils.misc.RandomUtils import net.ccbluex.liquidbounce.value.BoolValue import net.ccbluex.liquidbounce.value.FloatValue -@ModuleInfo(name = "Timer", category = ModuleCategory.WORLD, autoDisable = EnumAutoDisableType.RESPAWN) +@ModuleInfo(name = "Timer", category = ModuleCategory.MOVEMENT, autoDisable = EnumAutoDisableType.RESPAWN) object Timer : Module() { // private val minSpeedValue = FloatValue("Speed", 2F, 0.1F, 10F) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Breaker.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Breaker.kt similarity index 98% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Breaker.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Breaker.kt index e118f232d8..94a40bb06d 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Breaker.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Breaker.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.other import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.* @@ -36,7 +36,7 @@ import net.minecraft.util.EnumFacing import net.minecraft.util.Vec3 import java.awt.Color -@ModuleInfo(name = "Breaker", category = ModuleCategory.WORLD) +@ModuleInfo(name = "Breaker", category = ModuleCategory.OTHER) object Breaker : Module() { /** @@ -108,7 +108,7 @@ object Breaker : Module() { pos = find(targetId) if (throughWallsValue.equals("Hypixel")) { - val blockPos = find(26)?: return + val blockPos = find(26) ?: return if (!BlockUtils.isFullBlock(blockPos.down()) || !BlockUtils.isFullBlock(blockPos.up()) || !BlockUtils.isFullBlock(blockPos.north()) || !BlockUtils.isFullBlock(blockPos.east()) || !BlockUtils.isFullBlock(blockPos.south()) || !BlockUtils.isFullBlock(blockPos.west())) { pos = blockPos.up()?: return @@ -121,7 +121,7 @@ object Breaker : Module() { if (throughWallsValue.equals("Hypixel")) { if (pos != null) { if (!BlockUtils.isFullBlock(pos)) { - val blockPos = find(26)?: return + val blockPos = find(26) ?: return if (!BlockUtils.isFullBlock(blockPos.down()) || !BlockUtils.isFullBlock(blockPos.up()) || !BlockUtils.isFullBlock(blockPos.north()) || !BlockUtils.isFullBlock(blockPos.east()) || !BlockUtils.isFullBlock(blockPos.south()) || !BlockUtils.isFullBlock(blockPos.west())) { pos = blockPos.up()?: return diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Nuker.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Nuker.kt similarity index 98% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Nuker.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Nuker.kt index 5d994252d8..5a77db899b 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Nuker.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/other/Nuker.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.other import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.EventTarget @@ -12,6 +12,7 @@ import net.ccbluex.liquidbounce.event.UpdateEvent 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.features.module.modules.movement.FastBreak import net.ccbluex.liquidbounce.features.module.modules.player.AutoTool import net.ccbluex.liquidbounce.utils.RotationUtils import net.ccbluex.liquidbounce.utils.block.BlockUtils @@ -34,7 +35,7 @@ import net.minecraft.util.Vec3 import java.awt.Color import kotlin.math.roundToInt -@ModuleInfo(name = "Nuker", category = ModuleCategory.WORLD) +@ModuleInfo(name = "Nuker", category = ModuleCategory.OTHER) class Nuker : Module() { private val radiusValue = FloatValue("Radius", 5.2F, 1F, 6F) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/AntiVoid.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/AntiVoid.kt index 31e8748c0a..8332b26a55 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/AntiVoid.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/AntiVoid.kt @@ -13,7 +13,7 @@ import net.ccbluex.liquidbounce.event.WorldEvent 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.features.module.modules.world.Scaffold +import net.ccbluex.liquidbounce.features.module.modules.movement.Scaffold import net.ccbluex.liquidbounce.utils.MovementUtils import net.ccbluex.liquidbounce.utils.block.BlockUtils import net.ccbluex.liquidbounce.utils.misc.FallingPlayer diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/ChestAura.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/ChestAura.kt similarity index 97% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/ChestAura.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/ChestAura.kt index 8b8a9187f0..b7f5b5551c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/ChestAura.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/ChestAura.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.player import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.* @@ -27,7 +27,7 @@ import net.minecraft.util.EnumFacing import net.minecraft.util.Vec3 import kotlin.concurrent.schedule -@ModuleInfo(name = "ChestAura", category = ModuleCategory.WORLD) +@ModuleInfo(name = "ChestAura", category = ModuleCategory.PLAYER) object ChestAura : Module() { private val rangeValue = FloatValue("Range", 5F, 1F, 6F) private val delayValue = IntegerValue("Delay", 100, 50, 500) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastPlace.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/FastPlace.kt similarity index 88% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastPlace.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/FastPlace.kt index 3c655c5ada..06d7200059 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/FastPlace.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/FastPlace.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.player import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.UpdateEvent @@ -14,7 +14,7 @@ import net.ccbluex.liquidbounce.value.BoolValue import net.ccbluex.liquidbounce.value.IntegerValue import net.minecraft.item.ItemBlock -@ModuleInfo(name = "FastPlace", category = ModuleCategory.WORLD) +@ModuleInfo(name = "FastPlace", category = ModuleCategory.PLAYER) object FastPlace : Module() { val speedValue = IntegerValue("Speed", 0, 0, 4) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Fisher.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Fisher.kt similarity index 95% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Fisher.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Fisher.kt index 7b25573fe9..dd6a787071 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Fisher.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Fisher.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.player import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.PacketEvent @@ -20,10 +20,9 @@ import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement import net.minecraft.network.play.server.S12PacketEntityVelocity import net.minecraft.network.play.server.S29PacketSoundEffect -@ModuleInfo(name = "Fisher", category = ModuleCategory.WORLD) +@ModuleInfo(name = "Fisher", category = ModuleCategory.PLAYER) object Fisher : Module() { - private val detectionValue = ListValue("Detection", arrayOf("Motion", "Sound"), "Sound") private val recastValue = BoolValue("Recast", true) private val recastDelayValue = IntegerValue("RecastDelay", 1, 0, 1000).displayable { recastValue.get() } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Stealer.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Stealer.kt similarity index 98% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Stealer.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Stealer.kt index c906a19ff5..3044b8fbaa 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Stealer.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/player/Stealer.kt @@ -3,14 +3,13 @@ * 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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.player import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.event.* 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.features.module.modules.player.InvManager import net.ccbluex.liquidbounce.ui.client.hud.element.elements.Notification import net.ccbluex.liquidbounce.ui.client.hud.element.elements.NotifyType import net.ccbluex.liquidbounce.utils.timer.MSTimer @@ -29,7 +28,7 @@ import net.minecraft.network.play.server.S30PacketWindowItems import net.minecraft.util.ResourceLocation import kotlin.random.Random -@ModuleInfo(name = "Stealer", category = ModuleCategory.WORLD) +@ModuleInfo(name = "Stealer", category = ModuleCategory.PLAYER) object Stealer : Module() { /** * OPTIONS @@ -179,7 +178,9 @@ object Stealer : Module() { move(screen, slot) } } - } else if (autoCloseValue.get() && screen.inventorySlots.windowId == contentReceived && autoCloseTimer.hasTimePassed(nextCloseDelay)) { + } else if (autoCloseValue.get() && screen.inventorySlots.windowId == contentReceived && autoCloseTimer.hasTimePassed( + nextCloseDelay + )) { mc.thePlayer.closeScreen() nextCloseDelay = TimeUtils.randomDelay(autoCloseMinDelayValue.get(), autoCloseMaxDelayValue.get()) } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Ambience.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Ambience.kt similarity index 95% rename from src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Ambience.kt rename to src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Ambience.kt index b4117cce75..072547a2f2 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/world/Ambience.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Ambience.kt @@ -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.features.module.modules.world +package net.ccbluex.liquidbounce.features.module.modules.visual import net.ccbluex.liquidbounce.event.EventTarget import net.ccbluex.liquidbounce.event.PacketEvent @@ -17,7 +17,7 @@ import net.ccbluex.liquidbounce.value.ListValue import net.minecraft.network.play.server.S03PacketTimeUpdate import net.minecraft.network.play.server.S2BPacketChangeGameState -@ModuleInfo(name = "Ambience", category = ModuleCategory.WORLD) +@ModuleInfo(name = "Ambience", category = ModuleCategory.VISUAL) object Ambience : Module() { private val timeModeValue = ListValue("TimeMode", arrayOf("None", "Normal", "Custom"), "Normal") diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/StorageESP.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/StorageESP.kt index 2942ec04ae..a47b35e855 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/StorageESP.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/StorageESP.kt @@ -11,7 +11,7 @@ import net.ccbluex.liquidbounce.event.Render3DEvent 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.features.module.modules.world.ChestAura.clickedBlocks +import net.ccbluex.liquidbounce.features.module.modules.player.ChestAura.clickedBlocks import net.ccbluex.liquidbounce.utils.render.RenderUtils import net.ccbluex.liquidbounce.utils.render.shader.shaders.GlowShader import net.ccbluex.liquidbounce.utils.render.shader.shaders.OutlineShader diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Zoom.java b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Zoom.java new file mode 100644 index 0000000000..cca64125cb --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/Zoom.java @@ -0,0 +1,57 @@ +/* + * 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.features.module.modules.visual; + +import net.ccbluex.liquidbounce.features.module.EnumTriggerType; +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.value.BoolValue; +import net.minecraft.client.settings.KeyBinding; +import net.minecraftforge.fml.common.gameevent.TickEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.input.Keyboard; + +@ModuleInfo(name = "Zoom", category = ModuleCategory.VISUAL, keyBind = Keyboard.KEY_C, triggerType = EnumTriggerType.PRESS) +public class Zoom extends Module { + private final BoolValue slowerSens = new BoolValue("Slower sensitivity", true); + private final BoolValue smoothCam = new BoolValue("Smooth camera", true); + + private boolean active; + private float oldFov; + private float oldSens; + + @SubscribeEvent + public void onTick(TickEvent.PlayerTickEvent e) { + if (this.getState()) { + if (mc.thePlayer != null) { + if (!active) { + oldSens = mc.gameSettings.mouseSensitivity; + oldFov = mc.gameSettings.fovSetting; + active = true; + + if (slowerSens.get()) { + mc.gameSettings.mouseSensitivity /= 4F; + } + + if (smoothCam.get()) { + KeyBinding.setKeyBindState(mc.gameSettings.keyBindSmoothCamera.getKeyCode(), true); + } + + mc.gameSettings.fovSetting = 25; + } + } else { + if (active) { + active = false; + + KeyBinding.setKeyBindState(mc.gameSettings.keyBindSmoothCamera.getKeyCode(), false); + mc.gameSettings.mouseSensitivity = oldSens; + mc.gameSettings.fovSetting = oldFov; + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlock.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlock.java index fd254d055e..f433a6fb91 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlock.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/block/MixinBlock.java @@ -10,7 +10,7 @@ import net.ccbluex.liquidbounce.features.module.modules.combat.Criticals; import net.ccbluex.liquidbounce.features.module.modules.player.NoFall; import net.ccbluex.liquidbounce.features.module.modules.visual.XRay; -import net.ccbluex.liquidbounce.features.module.modules.world.NoSlowBreak; +import net.ccbluex.liquidbounce.features.module.modules.movement.NoSlowBreak; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockState; diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/client/MixinMinecraft.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/client/MixinMinecraft.java index 80ccbb010d..44aa54e642 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/client/MixinMinecraft.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/client/MixinMinecraft.java @@ -258,8 +258,8 @@ public void clickMouse() { case MISS: default: - if (this.playerController.isNotCreative() && !FDPClient.moduleManager.getModule(NoClickDelay.class).getState()) { - this.leftClickCounter = 10; + if (this.playerController.isNotCreative() && !Objects.requireNonNull(FDPClient.moduleManager.getModule(NoClickDelay.class)).getState()) { + this.leftClickCounter = 0; } } } @@ -339,7 +339,7 @@ private void sendClickBlockToController(boolean leftClick) { private void setWindowIcon(CallbackInfo callbackInfo) { try { if (Util.getOSType() != Util.EnumOS.OSX) { - BufferedImage image = ImageIO.read(this.getClass().getResourceAsStream("/assets/minecraft/fdpclient/misc/icon.png")); + BufferedImage image = ImageIO.read(Objects.requireNonNull(this.getClass().getResourceAsStream("/assets/minecraft/fdpclient/misc/icon.png"))); ByteBuffer bytebuffer = ImageUtils.readImageToBuffer(ImageUtils.resizeImage(image, 16, 16)); if (bytebuffer == null) { throw new Exception("Error when loading image."); diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityPlayerSP.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityPlayerSP.java index 257d1675bb..e368b7fdad 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityPlayerSP.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityPlayerSP.java @@ -11,7 +11,7 @@ import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura; import net.ccbluex.liquidbounce.features.module.modules.exploit.AntiDesync; import net.ccbluex.liquidbounce.features.module.modules.movement.*; -import net.ccbluex.liquidbounce.features.module.modules.world.Scaffold; +import net.ccbluex.liquidbounce.features.module.modules.movement.Scaffold; import net.ccbluex.liquidbounce.handler.protocol.ProtocolBase; import net.ccbluex.liquidbounce.ui.clickgui.ClickGui; import net.ccbluex.liquidbounce.ui.clickgui.style.styles.newVer.NewUi; diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButton.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButton.java index 0ccc0e4125..7a65bec25c 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButton.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButton.java @@ -60,22 +60,23 @@ public abstract class MixinGuiButton extends Gui { public String displayString; @Unique - protected final AbstractButtonRenderer buttonRenderer = Objects.requireNonNull(FDPClient.moduleManager.getModule(ClientSpoof.class)).getButtonRenderer((GuiButton)(Object)this); + protected final AbstractButtonRenderer fDPClient$buttonRenderer = Objects.requireNonNull(FDPClient.moduleManager.getModule(ClientSpoof.class)).getButtonRenderer((GuiButton)(Object)this); /** * @author liuli */ @Inject(method = "drawButton", at = @At("HEAD"), cancellable = true) public void drawButton(Minecraft mc, int mouseX, int mouseY, CallbackInfo ci) { - if(this.buttonRenderer != null) { + if(this.fDPClient$buttonRenderer != null) { if(!visible) { return; } this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; this.mouseDragged(mc, mouseX, mouseY); - buttonRenderer.render(mouseX, mouseY, mc); - buttonRenderer.drawButtonText(mc); + fDPClient$buttonRenderer.render(mouseX, mouseY, mc); + fDPClient$buttonRenderer.drawButtonText(mc); ci.cancel(); } } + } diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButtonExt.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButtonExt.java index 60f0bd7fdd..fa92618e95 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButtonExt.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiButtonExt.java @@ -23,15 +23,15 @@ public void drawButton(Minecraft mc, int mouseX, int mouseY) { if(!visible) { return; } - if(this.buttonRenderer != null) { + if(this.fDPClient$buttonRenderer != null) { this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; - buttonRenderer.render(mouseX, mouseY, mc); + fDPClient$buttonRenderer.render(mouseX, mouseY, mc); mc.getTextureManager().bindTexture(buttonTextures); mouseDragged(mc, mouseX, mouseY); GlStateManager.resetColor(); - buttonRenderer.drawButtonText(mc); + fDPClient$buttonRenderer.drawButtonText(mc); } else { this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; int k = this.getHoverState(this.hovered); diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiContainer.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiContainer.java index b63dab1d99..519c96a092 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiContainer.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiContainer.java @@ -10,7 +10,7 @@ import net.ccbluex.liquidbounce.features.module.modules.client.Animations; import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura; import net.ccbluex.liquidbounce.features.module.modules.player.InvManager; -import net.ccbluex.liquidbounce.features.module.modules.world.Stealer; +import net.ccbluex.liquidbounce.features.module.modules.player.Stealer; import net.ccbluex.liquidbounce.utils.MinecraftInstance; import net.ccbluex.liquidbounce.utils.render.EaseUtils; import net.ccbluex.liquidbounce.utils.render.RenderUtils; diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiIngameMenu.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiIngameMenu.java index 4d49b80a70..0f4812ba86 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiIngameMenu.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiIngameMenu.java @@ -81,6 +81,6 @@ private void actionPerformed(GuiButton button, CallbackInfo callbackInfo) { } if (button.id == 1000) - mc.displayGuiScreen(new GuiTeleportation((GuiScreen) (Object) this)); + mc.displayGuiScreen(new GuiTeleportation()); } } diff --git a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiMultiplayer.java b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiMultiplayer.java index b069706b0d..97003787b2 100644 --- a/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiMultiplayer.java +++ b/src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/gui/MixinGuiMultiplayer.java @@ -7,7 +7,6 @@ import net.ccbluex.liquidbounce.handler.protocol.api.ProtocolSelector; import net.ccbluex.liquidbounce.ui.altmanager.GuiAltManager; -import net.ccbluex.liquidbounce.ui.client.GuiProxySelect; import net.ccbluex.liquidbounce.ui.elements.ToolDropdown; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; @@ -30,17 +29,10 @@ private void initGui(CallbackInfo callbackInfo) { buttonList.add(new GuiButton(1151, 4, height - 24, 68, 20, "Protocol")); } - @Inject(method = "actionPerformed", at = @At("HEAD")) private void actionPerformed(GuiButton button, CallbackInfo callbackInfo) { if (button.id == 997) ToolDropdown.toggleState(); - - switch(button.id) { - case 999: - mc.displayGuiScreen(new GuiProxySelect((GuiScreen) (Object) this)); - break; - } if (button.id == 998) { mc.displayGuiScreen(new GuiAltManager((GuiScreen) (Object) this)); } diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/cape/GuiCapeManager.kt b/src/main/java/net/ccbluex/liquidbounce/ui/cape/GuiCapeManager.kt index 47de01fe71..9067348d74 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/cape/GuiCapeManager.kt +++ b/src/main/java/net/ccbluex/liquidbounce/ui/cape/GuiCapeManager.kt @@ -31,7 +31,7 @@ object GuiCapeManager : GuiScreen() { private val capeList = mutableListOf() init { - arrayOf("classic", "classic2", "aurora", "forest", "rose", "lavender", "ocean", "modern1", "modern2", "lava", "citrus", "fire", "nightlife", "abstract", "blur", "owner").forEach { + arrayOf("classic", "classic2", "aurora", "forest", "rose", "lavender", "ocean", "modern1", "modern2", "lava", "citrus", "fire", "owner").forEach { try { embeddedCapes.add(loadCapeFromResource(it, "assets/minecraft/fdpclient/cape/$it.png")) } catch (e: Throwable) { @@ -93,7 +93,14 @@ object GuiCapeManager : GuiScreen() { jsonFile.writeText(FileManager.PRETTY_GSON.toJson(json), Charsets.UTF_8) } - private fun loadCapeFromResource(name: String, loc: String) = SingleImageCape(name, ImageIO.read(GuiCapeManager::class.java.classLoader.getResourceAsStream(loc))) + private fun loadCapeFromResource(name: String, loc: String): ICape { + val resourceStream = GuiCapeManager::class.java.classLoader.getResourceAsStream(loc) + if (resourceStream != null) { + return SingleImageCape(name, ImageIO.read(resourceStream)) + } else { + throw IllegalArgumentException("Resource not found: $loc") + } + } private fun loadCapeFromFile(name: String, file: File) = SingleImageCape(name, ImageIO.read(file)) @@ -110,7 +117,7 @@ object GuiCapeManager : GuiScreen() { this.buttonList.add(GuiButton(2, (width * 0.7).toInt(), (height * 0.5).toInt(), mc.fontRendererObj.getStringWidth("->") + 10, 20, "->")) } - override fun actionPerformed(p_actionPerformed_1_: GuiButton) { + override fun actionPerformed(pActionperformed1: GuiButton) { fun next(index: Int) { var chooseIndex = index if (chooseIndex >= capeList.size) { @@ -128,14 +135,14 @@ object GuiCapeManager : GuiScreen() { } } - when (p_actionPerformed_1_.id) { + when (pActionperformed1.id) { 0 -> mc.displayGuiScreen(null) 1 -> next(capeList.indexOf(nowCape) - 1) 2 -> next(capeList.indexOf(nowCape) + 1) } } - override fun drawScreen(p_drawScreen_1_: Int, p_drawScreen_2_: Int, p_drawScreen_3_: Float) { + override fun drawScreen(pDrawscreen1: Int, pDrawscreen2: Int, pDrawscreen3: Float) { // draw background this.drawDefaultBackground() @@ -146,7 +153,7 @@ object GuiCapeManager : GuiScreen() { GL11.glPopMatrix() // draw buttons - super.drawScreen(p_drawScreen_1_, p_drawScreen_2_, p_drawScreen_3_) + super.drawScreen(pDrawscreen1, pDrawscreen2, pDrawscreen3) // draw entity mc.thePlayer ?: return diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/clickgui/style/styles/light/LightClickGUI.java b/src/main/java/net/ccbluex/liquidbounce/ui/clickgui/style/styles/light/LightClickGUI.java index 893a778028..bc227f69c5 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/clickgui/style/styles/light/LightClickGUI.java +++ b/src/main/java/net/ccbluex/liquidbounce/ui/clickgui/style/styles/light/LightClickGUI.java @@ -463,18 +463,16 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { categoryYpos = 35; if (currentCategory == ModuleCategory.MOVEMENT) categoryYpos = 70; - if (currentCategory == ModuleCategory.WORLD) - categoryYpos = 105; if (currentCategory == ModuleCategory.PLAYER) - categoryYpos = 140; + categoryYpos = 105; if (currentCategory == ModuleCategory.EXPLOIT) - categoryYpos = 175; + categoryYpos = 140; if (currentCategory == ModuleCategory.OTHER) - categoryYpos = 210; + categoryYpos = 175; if (currentCategory == ModuleCategory.CLIENT) - categoryYpos = 245; + categoryYpos = 210; if (currentCategory == ModuleCategory.VISUAL) - categoryYpos = 280; + categoryYpos = 245; // detect mouse clicking on categories // and set animation if hovered over @@ -510,21 +508,6 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { } } } - if (isCategoryHovered(startX - 5, startY + 3 + 90, startX + 35 + categoryAnimation, startY + 13 + 115, mouseX, mouseY)) { - categoryYpos = 105; - if (Mouse.isButtonDown(0) && !categoryMouse) { - if (currentCategory != ModuleCategory.WORLD) { - currentCategory = ModuleCategory.WORLD; - categoryMouse = true; - if(searchBox.getText().isEmpty()) { - moduleStart = 0; - currentModule = FDPClient.moduleManager.getModuleInCategory(currentCategory).get(0); - alphaAnim.resetAlpha(); - valueAnim.resetAlpha(); - } - } - } - } if (isCategoryHovered(startX - 5, startY + 3 + 125, startX + 35 + categoryAnimation, startY + 13 + 150, mouseX, mouseY)) { categoryYpos = 140; if (Mouse.isButtonDown(0) && !categoryMouse) { @@ -627,12 +610,11 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { if (categoryAnimation > 4) { Fonts.font40.drawString("Combat", startX + 30 + Math.round(categoryAnimation / 5), startY + 35 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); Fonts.font40.drawString("Move", startX + 30 + Math.round(categoryAnimation / 5), startY + 70 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("World", startX + 30 + Math.round(categoryAnimation / 5), startY + 105 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("Player", startX + 30 + Math.round(categoryAnimation / 5), startY + 140 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("Exploit", startX + 30 + Math.round(categoryAnimation / 5), startY + 175 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("Misc", startX + 30 + Math.round(categoryAnimation / 5), startY + 210 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("Client", startX + 30 + Math.round(categoryAnimation / 5), startY + 245 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); - Fonts.font40.drawString("Render", startX + 30 + Math.round(categoryAnimation / 5), startY + 280 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); + Fonts.font40.drawString("Player", startX + 30 + Math.round(categoryAnimation / 5), startY + 105 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); + Fonts.font40.drawString("Exploit", startX + 30 + Math.round(categoryAnimation / 5), startY + 140 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); + Fonts.font40.drawString("Misc", startX + 30 + Math.round(categoryAnimation / 5), startY + 175 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); + Fonts.font40.drawString("Client", startX + 30 + Math.round(categoryAnimation / 5), startY + 210 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); + Fonts.font40.drawString("Render", startX + 30 + Math.round(categoryAnimation / 5), startY + 245 + 6 - fontHeight, new Color(30, 30, 30, Math.round(categoryAnimation * 5)).getRGB()); } searchBox.drawTextBox(); // 判断category所处的位置是否被按下或者被略过 diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiBackground.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiBackground.kt index 65c76d265e..90a554b419 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiBackground.kt +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiBackground.kt @@ -52,10 +52,10 @@ class GuiBackground(private val prevGui: GuiScreen) : GuiScreen() { particlesButton = GuiButton(2, width / 2 - 100, height / 4 + 40 + 25 * 4, "") buttonList.add(particlesButton) - buttonList.add(GuiButton(3, width / 2 - 100, height / 4 + 40 + 25 * 5, 98, 20, "%ui.background.change%")) - buttonList.add(GuiButton(4, width / 2 + 2, height / 4 + 40 + 25 * 5, 98, 20, "%ui.background.reset%")) + buttonList.add(GuiButton(3, width / 2 - 100, height / 4 + 40 + 25 * 5, 98, 20, "Change wallpaper")) + buttonList.add(GuiButton(4, width / 2 + 2, height / 4 + 40 + 25 * 5, 98, 20, "Reset wallpaper")) - buttonList.add(GuiButton(0, width / 2 - 100, height / 4 + 40 + 25 * 6 + 10, "%ui.back%")) + buttonList.add(GuiButton(0, width / 2 - 100, height / 4 + 40 + 25 * 6 + 10, "Back")) updateButtons() } @@ -114,8 +114,8 @@ class GuiBackground(private val prevGui: GuiScreen) : GuiScreen() { override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) { drawBackground(0) - mc.fontRendererObj.drawCenteredString("%ui.background%", this.width / 2F, height / 8F + 5F, 4673984, true) - mc.fontRendererObj.drawCenteredString("%ui.background.gcurrent%: " + if(FDPClient.background == null) { "Customized" } else { "Customized" }, + mc.fontRendererObj.drawCenteredString("Background", this.width / 2F, height / 8F + 5F, 4673984, true) + mc.fontRendererObj.drawCenteredString("Current: " + if(FDPClient.background == null) { "Customized" } else { "Customized" }, this.width / 2F, height / 4 + 40 + 25 * 2f + (20 - mc.fontRendererObj.FONT_HEIGHT) * 0.5f, Color.WHITE.rgb, true) super.drawScreen(mouseX, mouseY, partialTicks) diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiProxySelect.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiProxySelect.kt deleted file mode 100644 index 869589c77b..0000000000 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiProxySelect.kt +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.ui.client - -import net.ccbluex.liquidbounce.FDPClient -import net.ccbluex.liquidbounce.handler.network.ProxyManager -import net.minecraft.client.gui.GuiButton -import net.minecraft.client.gui.GuiScreen -import net.minecraft.client.gui.GuiTextField -import org.lwjgl.input.Keyboard -import java.net.Proxy - -class GuiProxySelect(private val prevGui: GuiScreen) : GuiScreen() { - - private lateinit var textField: GuiTextField - private lateinit var type: GuiButton - private lateinit var stat: GuiButton - - override fun initGui() { - Keyboard.enableRepeatEvents(true) - textField = GuiTextField(3, mc.fontRendererObj, width / 2 - 100, 60, 200, 20) - textField.isFocused = true - textField.text = ProxyManager.proxy - textField.maxStringLength = 114514 - buttonList.add(GuiButton(1, width / 2 - 100, height / 4 + 96, "").also { type = it }) - buttonList.add(GuiButton(2, width / 2 - 100, height / 4 + 120, "").also { stat = it }) - buttonList.add(GuiButton(0, width / 2 - 100, height / 4 + 144, "%ui.back%")) - updateButtonStat() - } - - private fun updateButtonStat() { - type.displayString = "%ui.proxy.type%: " + ProxyManager.proxyType.name - stat.displayString = "%ui.status%: " + if (ProxyManager.isEnable) "§a%ui.on%" else "§c%ui.off%" - } - - override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) { - drawBackground(0) - drawCenteredString(mc.fontRendererObj, "%ui.proxy.screen%", width / 2, 34, 0xffffff) - textField.drawTextBox() - if (textField.text.isEmpty() && !textField.isFocused) { - drawString(mc.fontRendererObj, "§7%ui.proxy.address%", width / 2 - 100, 66, 0xffffff) - } - super.drawScreen(mouseX, mouseY, partialTicks) - } - - override fun actionPerformed(button: GuiButton) { - when (button.id) { - 0 -> { - ProxyManager.proxy = textField.text - mc.displayGuiScreen(prevGui) - } - 1 -> { - when(ProxyManager.proxyType) { - Proxy.Type.SOCKS -> ProxyManager.proxyType = Proxy.Type.HTTP - Proxy.Type.HTTP -> ProxyManager.proxyType = Proxy.Type.SOCKS - else -> throw IllegalStateException("Proxy type is not supported!") - } - } - 2 -> { - ProxyManager.isEnable = !ProxyManager.isEnable - } - } - updateButtonStat() - FDPClient.fileManager.saveConfig(FDPClient.fileManager.specialConfig) - } - - override fun onGuiClosed() { - ProxyManager.proxy = textField.text - } - - override fun keyTyped(typedChar: Char, keyCode: Int) { - if (Keyboard.KEY_ESCAPE == keyCode) { - mc.displayGuiScreen(prevGui) - return - } - - if (textField.isFocused) { - textField.textboxKeyTyped(typedChar, keyCode) - } - - super.keyTyped(typedChar, keyCode) - } - - override fun mouseClicked(mouseX: Int, mouseY: Int, mouseButton: Int) { - textField.mouseClicked(mouseX, mouseY, mouseButton) - super.mouseClicked(mouseX, mouseY, mouseButton) - } - - override fun updateScreen() { - textField.updateCursorCounter() - super.updateScreen() - } -} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiInfo.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiInfo.kt index 84ce5c48d8..76470354c2 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiInfo.kt +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiInfo.kt @@ -8,6 +8,7 @@ package net.ccbluex.liquidbounce.ui.client.gui import net.ccbluex.liquidbounce.FDPClient import net.ccbluex.liquidbounce.features.command.CommandManager import net.ccbluex.liquidbounce.handler.combat.CombatManager +import net.ccbluex.liquidbounce.handler.protocol.api.ProtocolSelector import net.ccbluex.liquidbounce.ui.client.GuiBackground import net.ccbluex.liquidbounce.ui.sound.TipSoundManager import net.ccbluex.liquidbounce.utils.misc.MiscUtils @@ -15,26 +16,25 @@ import net.ccbluex.liquidbounce.utils.render.RenderUtils import net.minecraft.client.gui.GuiButton import net.minecraft.client.gui.GuiScreen import net.minecraft.util.ResourceLocation +import net.minecraftforge.fml.client.GuiModList import org.lwjgl.input.Keyboard class GuiInfo(private val prevGui: GuiScreen) : GuiScreen() { - private val BUTTON_VERSIONS = 2 - override fun initGui() { - buttonList.add(GuiButton(1, width / 2 - 100, height / 4 + 20 + 4, "Tools")) - buttonList.add(GuiButton(2, width / 2 - 100, height / 4 + 55 + 2, "Version")) - buttonList.add(GuiButton(3, width / 2 - 100, height / 4 + 90 - 2, "Website")) - buttonList.add(GuiButton(4, width / 2 - 100, height / 4 + 125 - 4, "Staff")) - buttonList.add(GuiButton(5, width / 2 - 100, height / 4 + 160 - 6, "Reload")) + buttonList.add(GuiButton(1, width / 2 - 100, height / 4 + 20 + 4, "Open Website")) + buttonList.add(GuiButton(2, width / 2 - 100, height / 4 + 55 + 2, "Join Discord")) + buttonList.add(GuiButton(3, width / 2 - 100, height / 4 + 90 - 2, "Gui Tools")) + buttonList.add(GuiButton(4, width / 2 - 100, height / 4 + 125 - 4, "Mod List")) + buttonList.add(GuiButton(5, width / 2 - 100, height / 4 + 160 - 6, "Version")) buttonList.add(GuiButton(6, width / 2 - 100, height / 4 + 195 - 8, "Done")) super.initGui() } override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) { drawDefaultBackground() - RenderUtils.drawImage(ResourceLocation("fdpclient/ui/mainmenu/portal.png"), 0, 0, width, height) + RenderUtils.drawImage(ResourceLocation("fdpclient/background.png"), 0, 0, width, height) super.drawScreen(mouseX, mouseY, partialTicks) } @@ -47,22 +47,12 @@ class GuiInfo(private val prevGui: GuiScreen) : GuiScreen() { override fun actionPerformed(button: GuiButton) { when (button.id) { - 1 -> mc.displayGuiScreen(GuiBackground(this)) - 2 -> BUTTON_VERSIONS - 3 -> MiscUtils.showURL(FDPClient.CLIENT_WEBSITE) - 5 -> { - FDPClient.commandManager = CommandManager() - FDPClient.commandManager.registerCommands() - for (module in FDPClient.moduleManager.modules) - FDPClient.moduleManager.generateCommand(module) - FDPClient.tipSoundManager = TipSoundManager() - FDPClient.combatManager = CombatManager() - FDPClient.fileManager.loadConfig(FDPClient.fileManager.hudConfig) - FDPClient.fileManager.loadConfig(FDPClient.fileManager.accountsConfig) - FDPClient.fileManager.loadConfig(FDPClient.fileManager.friendsConfig) - } + 1 -> MiscUtils.showURL(FDPClient.CLIENT_WEBSITE) + 2 -> MiscUtils.showURL(FDPClient.CLIENT_DISCORD) + 3 -> mc.displayGuiScreen(GuiBackground(this)) + 4 -> mc.displayGuiScreen(GuiModList(this)) + 5 -> mc.displayGuiScreen(ProtocolSelector(this as GuiScreen)) 6 -> mc.displayGuiScreen(prevGui) - // BUTTON_VERSIONS -> mc.displayGuiScreen(GuiProtocolSelector(this)) } } } \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiMainMenu.java b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiMainMenu.java index 784957c6b3..2e33168544 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiMainMenu.java +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiMainMenu.java @@ -52,12 +52,9 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { GlStateManager.translate(-this.currentX / 30.0F, -this.currentY / 15.0F, 0.0F); RenderUtils.drawRoundedCornerRect((float) this.width / 2.0F - 80.0F * ((float) this.butt.size() / 2.0F) - 3f, (float) this.height / 2.0F - 100.0F - 3f, (float) this.width / 2.0F + 80.0F * ((float) this.butt.size() / 2.0F) + 3f, (float) this.height / 2.0F + 103.0F, 10, new Color(0, 0, 0, 80).getRGB()); FontLoaders.F18.drawCenteredString("Made by SkidderMC with love.",(float)this.width / 2.0F,(float)this.height / 2.0F + 70.0F,new Color(255,255,255,255).getRGB()); - //BlurUtils.INSTANCE.draw(0, 0, mc.displayWidth, mc.displayHeight, 30f); FontLoaders.F40.drawCenteredString("FDPCLIENT",(float)this.width / 2.0F,(float)this.height / 2.0F - 70.0F,new Color(255,255,255).getRGB()); - //BlurUtils.INSTANCE.draw(0, 0, mc.displayWidth, mc.displayHeight, 10f); ParticleUtils.drawParticles(mouseX, mouseY); RenderUtils.drawRoundedCornerRect((float) this.width / 2.0F - 80.0F * ((float) this.butt.size() / 2.0F), (float) this.height / 2.0F - 100.0F, (float) this.width / 2.0F + 80.0F * ((float) this.butt.size() / 2.0F), (float) this.height / 2.0F + 100.0F, 10, new Color(0, 0, 0, 100).getRGB()); - //RenderUtils.drawRect((float)this.width / 2.0F - 50.0F * ((float)this.butt.size() / 2.0F), (float)this.height / 2.0F + 20.0F, (float)this.width / 2.0F + 50.0F * ((float)this.butt.size() / 2.0F), (float)this.height / 2.0F + 50.0F, 1040187392); float startX = (float) this.width / 2.0F - 64.5F * ((float) this.butt.size() / 2.0F); for (Iterator var9 = this.butt.iterator(); var9.hasNext(); startX += 75.0F) { @@ -76,10 +73,9 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { } protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException { - Iterator var4 = this.butt.iterator(); - while(var4.hasNext()) { - MainMenuButton button = (MainMenuButton)var4.next(); + for (Object o : this.butt) { + MainMenuButton button = (MainMenuButton) o; button.mouseClick(mouseX, mouseY, mouseButton); } diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiTeleportation.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiTeleportation.kt index bdf150a794..1e5146abc4 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiTeleportation.kt +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/gui/GuiTeleportation.kt @@ -20,7 +20,7 @@ import net.minecraft.client.gui.GuiTextField import net.minecraft.network.play.client.C03PacketPlayer import org.lwjgl.input.Keyboard -class GuiTeleportation(private val prevGui: GuiScreen) : GuiScreen() { +class GuiTeleportation : GuiScreen() { private lateinit var teleportXField: GuiTextField private lateinit var teleportYField: GuiTextField private lateinit var teleportZField: GuiTextField diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.java b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.java new file mode 100644 index 0000000000..068b8a4bea --- /dev/null +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.java @@ -0,0 +1,200 @@ +/* + * 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.ui.client.hud.element.elements; + +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.ColorUtils; +import net.ccbluex.liquidbounce.utils.render.RenderUtils; +import net.ccbluex.liquidbounce.utils.render.RoundedUtil; +import net.ccbluex.liquidbounce.value.*; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.item.ItemStack; + +import java.awt.*; + +@ElementInfo(name = "Armor") +public class Armor extends Element { + private final BoolValue enchantValue = new BoolValue("Enchant", true); + private final ListValue modeValue = new ListValue("Alignment", new String[]{"Horizontal", "Vertical"}, "Vertical"); + private final ListValue showAttributes = new ListValue("Attributes", new String[]{"None", "Value", "Percentage", "All"}, "Percentage"); + private final BoolValue minimalMode = new BoolValue("Minimal Mode", false); + private final IntegerValue percentageY = new IntegerValue("PositionY", -19, -50, 50); + private final IntegerValue percentageX = new IntegerValue("PositionX", 21, -50, 50); + public static IntegerValue a2 = new IntegerValue("Border", 0, 0, 255); + public static FloatValue ra = new FloatValue("Radius", 4.5f, 0.1f, 8.0f); + private final IntegerValue r = new IntegerValue("Red", 255, 0, 255); + private final IntegerValue g = new IntegerValue("Green", 255, 0, 255); + private final IntegerValue b = new IntegerValue("Blue", 255, 0, 255); + public static IntegerValue r2 = new IntegerValue("Red-2", 0, 0, 255); + public static IntegerValue g2 = new IntegerValue("Green-2", 19, 0, 255); + public static IntegerValue b2 = new IntegerValue("Blue-2", 0, 0, 255); + private final IntegerValue a = new IntegerValue("Alpha", 255, 0, 255); + private final Minecraft mc = Minecraft.getMinecraft(); + + @Override + public Border drawElement(float partialTicks) { + String mode = modeValue.get(); + EntityPlayerSP player = mc.thePlayer; + + if (mc.playerController.isInCreativeMode()) { + return "Horizontal".equalsIgnoreCase(mode) ? new Border(0.0f, 0.0f, 72.0f, 17.0f) : new Border(0.0f, 0.0f, 18.0f, 72.0f); + } + + int color = new Color(r.get(), g.get(), b.get(), a.get()).getRGB(); + boolean isInsideWater = mc.thePlayer.isInsideOfMaterial(Material.water); + int x = 1; + int y = isInsideWater ? -10 : 0; + + if (mode.equalsIgnoreCase("Horizontal")) { + GlStateManager.enableCull(); + drawBackgroundWithContour(x, y, color); + drawArmorItems(x, y, color, player); + } else if (mode.equalsIgnoreCase("Vertical")) { + GlStateManager.enableCull(); + drawBackgroundWithContourVertical(x, y, color); + drawArmorItemsVertical(x, y, color, player); + } + + return mode.equalsIgnoreCase("Horizontal") ? new Border(0.0f, 0.0f, 72.0f, 17.0f) : new Border(0.0f, 0.0f, 18.0f, 72.0f); + } + + private void drawBackgroundWithContour(int x, int y, int color) { + Color color1 = new Color(r.get(), g.get(), b.get(), a.get()); + Color color2 = new Color(r.get(), g.get(), b.get(), a.get()); + Color color3 = new Color(r2.get(), g2.get(), b2.get(), a2.get()); + Color color4 = new Color(r2.get(), g2.get(), b2.get(), a2.get()); + + RoundedUtil.drawGradientRound(x - 2.0f, -12.0f, 75.0f, 40.0f, ra.get(), ColorUtils.applyOpacity(color4, 0.85f), color1, color3, color2); + + Fonts.fontSFUI32.drawString("Armor", x, -8.0f, color); + } + + private void drawArmorItems(int x, int y, int color, EntityPlayerSP player) { + RenderItem renderItem = mc.getRenderItem(); + + for (int i = 3; i >= 0; --i) { + ItemStack stack = player.inventory.armorInventory[i]; + if (stack == null) continue; + + renderItem.renderItemIntoGUI(stack, x, y); + renderItem.renderItemOverlays(mc.fontRendererObj, stack, x, y); + + GlStateManager.pushMatrix(); + if (showAttributes.get().equals("Value")) { + // Exibe o valor numérico + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + Fonts.fontSFUI32.drawString(String.valueOf(stack.getMaxDamage() - stack.getItemDamage()), x + percentageXOffset, y + 15.0f + Fonts.fontSFUI32.getHeight() + percentageYOffset, color); + } else if (showAttributes.get().equals("Percentage")) { + // Exibe a porcentagem + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + float percentage = (float) (stack.getMaxDamage() - stack.getItemDamage()) / (float) stack.getMaxDamage() * 100.0f; + String percentageText; + if (minimalMode.get()) { + // Display percentage with two decimal places + percentageText = String.format("%.2f%%", percentage); + } else { + // Display percentage with whole numbers only + percentageText = String.format("%.0f%%", percentage); + } + Fonts.fontSFUI32.drawString(percentageText, x + percentageXOffset, y + 15.0f + Fonts.fontSFUI35.getHeight() + percentageYOffset, color); + } else if (showAttributes.equals("All")) { + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + int value = stack.getMaxDamage() - stack.getItemDamage(); + float percentage = (float) value / (float) stack.getMaxDamage() * 100.0f; + String damageText = String.format("%d/%d (%.0f%%)", value, stack.getMaxDamage(), percentage); + Fonts.fontSFUI35.drawString(damageText, x + percentageXOffset, y + 15.0f + Fonts.fontSFUI35.getHeight() + percentageYOffset, color); + } + + if (enchantValue.get()) { + RenderUtils.drawExhiEnchants(stack, x, y); + } + GlStateManager.popMatrix(); + + x += 18; + } + + GlStateManager.enableAlpha(); + GlStateManager.enableBlend(); + GlStateManager.disableLighting(); + GlStateManager.disableCull(); + } + + private void drawBackgroundWithContourVertical(int x, int y, int color) { + Color color1 = new Color(r.get(), g.get(), b.get(), a.get()); + Color color2 = new Color(r.get(), g.get(), b.get(), a.get()); + Color color3 = new Color(r2.get(), g2.get(), b2.get(), a2.get()); + Color color4 = new Color(r2.get(), g2.get(), b2.get(), a2.get()); + + RoundedUtil.drawGradientRound(x - 2.0f, y - 12.0f, 18.0f, 72.0f, ra.get(), ColorUtils.applyOpacity(color4, 0.85f), color1, color3, color2); + + Fonts.fontSFUI32.drawString("Armor", x, y - 8.0f, color); + } + + + private void drawArmorItemsVertical(int x, int y, int color, EntityPlayerSP player) { + RenderItem renderItem = mc.getRenderItem(); + + for (int i = 3; i >= 0; --i) { + ItemStack stack = player.inventory.armorInventory[i]; + if (stack == null) continue; + + renderItem.renderItemIntoGUI(stack, x, y); + renderItem.renderItemOverlays(mc.fontRendererObj, stack, x, y); + + GlStateManager.pushMatrix(); + if (showAttributes.get().equals("Value")) { + // Exibe o valor numérico + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + Fonts.fontSFUI32.drawString(String.valueOf(stack.getMaxDamage() - stack.getItemDamage()), x + percentageXOffset, y + 15.0f + Fonts.fontSFUI32.getHeight() + percentageYOffset, color); + } else if (showAttributes.get().equals("Percentage")) { + // Exibe a porcentagem + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + float percentage = (float) (stack.getMaxDamage() - stack.getItemDamage()) / (float) stack.getMaxDamage() * 100.0f; + String percentageText; + if (minimalMode.get()) { + // Display percentage with two decimal places + percentageText = String.format("%.2f%%", percentage); + } else { + // Display percentage with whole numbers only + percentageText = String.format("%.0f%%", percentage); + } + Fonts.fontSFUI32.drawString(percentageText, x + percentageXOffset, y + 15.0f + Fonts.fontSFUI32.getHeight() + percentageYOffset, color); + } else if (showAttributes.equals("All")) { + // Exibe número e porcentagem juntos + float percentageXOffset = (float) percentageX.get(); + float percentageYOffset = (float) percentageY.get(); + int value = stack.getMaxDamage() - stack.getItemDamage(); + float percentage = (float) value / (float) stack.getMaxDamage() * 100.0f; + String damageText = String.format("%d/%d (%.0f%%)", value, stack.getMaxDamage(), percentage); + Fonts.fontSFUI32.drawString(damageText, x + percentageXOffset, y + 15.0f + Fonts.fontSFUI32.getHeight() + percentageYOffset, color); + } + + if (enchantValue.get()) { + RenderUtils.drawExhiEnchants(stack, x, y); + } + GlStateManager.popMatrix(); + + y += 18; + } + + GlStateManager.enableAlpha(); + GlStateManager.enableBlend(); + GlStateManager.disableLighting(); + GlStateManager.disableCull(); + } +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.kt deleted file mode 100644 index aebed22540..0000000000 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Armor.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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.ui.client.hud.element.elements - -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.RenderUtils -import net.ccbluex.liquidbounce.value.ListValue -import net.minecraft.block.material.Material -import net.minecraft.client.renderer.GlStateManager -import net.minecraft.client.renderer.RenderHelper - -/** - * CustomHUD Armor element - * - * Shows a horizontal display of current armor - */ -@ElementInfo(name = "Armor") -class Armor(x: Double = -8.0, y: Double = 57.0, scale: Float = 1F, - side: Side = Side(Side.Horizontal.MIDDLE, Side.Vertical.DOWN)) : Element(x, y, scale, side) { - - private val modeValue = ListValue("Mode", arrayOf("LiquidBounce", "Exhibition"), "Exhibition") - private val alignment = ListValue("Alignment", arrayOf("Horizontal", "Vertical"), "Horizontal") - - /** - * Draw element - */ - override fun drawElement(partialTicks: Float): Border { - if (mc.playerController.isNotCreative) { - val renderItem = mc.renderItem - val isInsideWater = mc.thePlayer.isInsideOfMaterial(Material.water) - val mode = modeValue.get() - val align = alignment.get() - - var x = 1 - var y = if (isInsideWater) -10 else 0 - - RenderHelper.enableGUIStandardItemLighting() - - for (index in 3 downTo 0) { - val stack = mc.thePlayer.inventory.armorInventory[index] ?: continue - - renderItem.renderItemIntoGUI(stack, x, y) - renderItem.renderItemOverlays(mc.fontRendererObj, stack, x, y) - if (mode.equals("Exhibition", true)) { - RenderUtils.drawExhiEnchants(stack, x.toFloat(), y.toFloat()) - if (align.equals("Horizontal", true)) - x += 16 - else if (align.equals("Vertical", true)) - y += 16 - } else - if (align.equals("Horizontal", true)) - x += 18 - else if (align.equals("Vertical", true)) - y += 18 - } - - if (mode.equals("Exhibition", true)) { - val mainStack = mc.thePlayer.heldItem - if (mainStack != null && mainStack.item != null) { - renderItem.renderItemIntoGUI(mainStack, x, y) - renderItem.renderItemOverlays(mc.fontRendererObj, mainStack, x, y) - RenderUtils.drawExhiEnchants(mainStack, x.toFloat(), y.toFloat()) - } - } - - RenderHelper.disableStandardItemLighting() - GlStateManager.enableAlpha() - GlStateManager.disableBlend() - GlStateManager.disableLighting() - GlStateManager.disableCull() - } - - return if (modeValue.get().equals("Exhibition", true)) { - if (alignment.get().equals("Horizontal", true)) - Border(0F, 0F, 80F, 17F) - else - Border(0F, 0F, 18F, 80F) - } else if (alignment.get().equals("Horizontal", true)) - Border(0F, 0F, 72F, 17F) - else - Border(0F, 0F, 18F, 72F) - } -} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Effects.java b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Effects.java index bf99961e39..4ef2f9553f 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Effects.java +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Effects.java @@ -14,6 +14,9 @@ import net.ccbluex.liquidbounce.utils.render.PotionData; import net.ccbluex.liquidbounce.utils.render.RenderUtils; import net.ccbluex.liquidbounce.utils.render.Translate; +import net.ccbluex.liquidbounce.value.BoolValue; +import net.ccbluex.liquidbounce.value.FontValue; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.resources.I18n; @@ -23,14 +26,24 @@ import org.lwjgl.opengl.GL11; import java.awt.*; -import java.util.HashMap; -import java.util.Map; +import java.util.*; @ElementInfo(name = "Effects") public class Effects extends Element { + private final BoolValue EffectFDP = new BoolValue("FDP Mode", true); + private final BoolValue EffectMinecraft = new BoolValue("Default Mode", true); + public final BoolValue iconValue = new BoolValue("Icon", true); + public final BoolValue nameValue = new BoolValue("Name", true); + public final BoolValue colorValue = new BoolValue("Color", false); + public static FontValue font = new FontValue("Font", Fonts.minecraftFont); + public final BoolValue shadow = new BoolValue("Shadow", true); + + private final float x = 10.0f; + private final float y = 100.0f; private final Map potionMap = new HashMap<>(); protected Border draw() { + if (EffectFDP.get() ) { GlStateManager.pushMatrix(); int y = 0; for (final PotionEffect potionEffect : mc.thePlayer.getActivePotionEffects()) { @@ -65,7 +78,6 @@ protected Border draw() { potionData.translate.interpolate(0, y, 0.1); potionData.animationX = (float) getAnimationState(potionData.getAnimationX(), 1.2F * state, Math.max(10.0F, Math.abs(potionData.animationX - 1.2F * state) * 15.0F) * 0.3F); -// System.out.println(potionData.translate.getY()); RenderUtils.drawRect(0, potionData.translate.getY(), 120, potionData.translate.getY() + 30F, realpha.reAlpha(Colors.GREY.c, 0.1F)); RenderUtils.drawRect(0, potionData.translate.getY(), potionData.animationX, potionData.translate.getY() + 30F, realpha.reAlpha((new Color(34, 24, 20)).brighter().getRGB(), 0.3F)); RenderUtils.drawShadow(0, Math.round(potionData.translate.getY()), 120, 30); @@ -91,7 +103,47 @@ protected Border draw() { } GlStateManager.popMatrix(); return new Border(0F, 0F, 120F, 30F); + } + if (EffectMinecraft.get() ) { + int xOffset = 21; + int yOffset = 14; + + Collection activePotions = mc.thePlayer.getActivePotionEffects(); + ArrayList sortedPotions = new ArrayList<>(activePotions); + sortedPotions.sort(Comparator.comparingInt(potion -> -potion.getDuration())); + + GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); + GlStateManager.disableLighting(); + + FontRenderer fontRenderer = font.get(); + + for (PotionEffect potion : sortedPotions) { + Potion effect = Potion.potionTypes[potion.getPotionID()]; + assert (effect != null); + + if (effect.hasStatusIcon() && iconValue.get()) { + drawStatusIcon(xOffset, yOffset, effect.getStatusIconIndex() % 8 * 18, 198 + effect.getStatusIconIndex() / 8 * 18); + } + + if (nameValue.get()) { + drawPotionName(potion, effect, xOffset, yOffset, fontRenderer); + } + + if (nameValue.get()) { + drawPotionDuration(potion, xOffset, yOffset, fontRenderer); + } + + drawPotionDuration(potion, xOffset, yOffset, fontRenderer); + + yOffset += fontRenderer.FONT_HEIGHT * 2 + 4; // Add some space between the effects + } + float height = yOffset - 4; + + float width = 100.0f; + return new Border(0, 0, width, height); + } + return null; } private String intToRomanByGreedy(int num) { @@ -123,6 +175,38 @@ private double getAnimationState(double animation, double finalState, double spe return animation; } + private void drawStatusIcon(int xOffset, int yOffset, int textureX, int textureY) { + mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/inventory.png")); + RenderUtils.drawTexturedModalRect((int) x + xOffset - 20, (int) y + yOffset, textureX, textureY, 18, 18, 0); + } + + private void drawPotionName(PotionEffect potion, Potion effect, int xOffset, int yOffset, FontRenderer fontRenderer) { + String level = I18n.format(effect.getName()); + if (potion.getAmplifier() > 0) { + int amplifier = Math.min(potion.getAmplifier() + 1, 4); + level += " " + I18n.format("enchantment.level." + amplifier); + } + + int potionColor = colorValue.get() ? getPotionColor(potion) : Color.WHITE.getRGB(); // Use white color when colorValue is false + fontRenderer.drawString(level, x + xOffset, y + yOffset, potionColor, shadow.get()); + } + + private void drawPotionDuration(PotionEffect potion, int xOffset, int yOffset, FontRenderer fontRenderer) { + String durationString = Potion.getDurationString(potion); + int potionColor = colorValue.get() ? getPotionColor(potion) : Color.WHITE.getRGB(); // Use white color when colorValue is false + fontRenderer.drawString(durationString, x + xOffset, y + yOffset + (nameValue.get() ? fontRenderer.FONT_HEIGHT : (float) fontRenderer.FONT_HEIGHT / 2), potionColor, shadow.get()); + } + + private int getPotionColor(PotionEffect potion) { + if (potion.getDuration() < 200) { + return new Color(215, 59, 59).getRGB(); + } else if (potion.getDuration() < 400) { + return new Color(231, 143, 32).getRGB(); + } else { + return new Color(172, 171, 171).getRGB(); + } + } + @Override public Border drawElement(float partialTicks) { diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Text.kt b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Text.kt index b7dccb468d..2cd90ab4c8 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Text.kt +++ b/src/main/java/net/ccbluex/liquidbounce/ui/client/hud/element/elements/Text.kt @@ -103,6 +103,7 @@ class Text( "speed" -> return DECIMAL_FORMAT.format(MovementUtils.bps) "bps" -> return DECIMAL_FORMAT.format(MovementUtils.bps) "health" -> return DECIMAL_FORMAT.format(mc.thePlayer.health) + "counter" -> return DECIMAL_FORMAT.format("" + mc.thePlayer.currentEquippedItem.stackSize) "yaw" -> return DECIMAL_FORMAT.format(mc.thePlayer.rotationYaw) "pitch" -> return DECIMAL_FORMAT.format(mc.thePlayer.rotationPitch) "attackDist" -> return if (FDPClient.combatManager.target != null) mc.thePlayer.getDistanceToEntity(FDPClient.combatManager.target).toString() + " Blocks" else "Hasn't attacked" diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/font/Fonts.java b/src/main/java/net/ccbluex/liquidbounce/ui/font/Fonts.java index 4df872e5ca..b496e31cd8 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/font/Fonts.java +++ b/src/main/java/net/ccbluex/liquidbounce/ui/font/Fonts.java @@ -14,6 +14,7 @@ import java.awt.*; import java.io.*; import java.lang.reflect.Field; +import java.nio.file.Files; import java.util.ArrayList; import java.util.List; @@ -102,7 +103,6 @@ public static void loadFonts() { fontTenacity40 = new GameFontRenderer(getFont("tenacity.ttf", 40)); fontMainMenu60 = new GameFontRenderer(getFont("mainmenu.ttf", 60)); fontCheck42 = new GameFontRenderer(getFont("check.ttf", 42)); - getCustomFonts(); initFonts(); @@ -243,29 +243,9 @@ public static List getFonts() { return fonts; } - public static List getCustomFonts() { - final List fonts = new ArrayList<>(); - - for(final Field fontField : Fonts.class.getDeclaredFields()) { - try { - fontField.setAccessible(true); - - final Object fontObj = fontField.get(null); - - if(fontObj instanceof GameFontRenderer) fonts.add((GameFontRenderer) fontObj); - }catch(final IllegalAccessException e) { - e.printStackTrace(); - } - } - - fonts.addAll(Fonts.CUSTOM_FONT_RENDERERS); - - return fonts; - } - private static Font getFont(final String fontName, final int size) { try { - final InputStream inputStream = new FileInputStream(new File(FDPClient.fileManager.getFontsDir(), fontName)); + final InputStream inputStream = Files.newInputStream(new File(FDPClient.fileManager.getFontsDir(), fontName).toPath()); Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream); awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size); inputStream.close(); diff --git a/src/main/java/net/ccbluex/liquidbounce/ui/font/cf/FontLoaders.java b/src/main/java/net/ccbluex/liquidbounce/ui/font/cf/FontLoaders.java index 897d21d555..727f20715a 100644 --- a/src/main/java/net/ccbluex/liquidbounce/ui/font/cf/FontLoaders.java +++ b/src/main/java/net/ccbluex/liquidbounce/ui/font/cf/FontLoaders.java @@ -8,6 +8,7 @@ import net.ccbluex.liquidbounce.utils.MinecraftInstance; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; + import java.awt.*; import java.io.InputStream; import java.util.ArrayList; @@ -67,4 +68,4 @@ private static Font getMojangles(int size) { return font; } -} +} \ No newline at end of file diff --git a/src/main/java/net/ccbluex/liquidbounce/utils/render/ColorUtils.kt b/src/main/java/net/ccbluex/liquidbounce/utils/render/ColorUtils.kt index b8c768de65..af05520ce4 100644 --- a/src/main/java/net/ccbluex/liquidbounce/utils/render/ColorUtils.kt +++ b/src/main/java/net/ccbluex/liquidbounce/utils/render/ColorUtils.kt @@ -204,13 +204,13 @@ object ColorUtils { @JvmStatic fun hslRainbow( - index: Int, - lowest: Float = ColorManager.rainbowStartValue.get(), - bigest: Float = ColorManager.rainbowStopValue.get(), - indexOffset: Int = 300, - timeSplit: Int = ColorManager.rainbowSpeedValue.get(), - saturation: Float = ColorManager.rainbowSaturationValue.get(), - brightness: Float = ColorManager.rainbowBrightnessValue.get() + index: Int, + lowest: Float = ColorManager.rainbowStartValue.get(), + bigest: Float = ColorManager.rainbowStopValue.get(), + indexOffset: Int = 300, + timeSplit: Int = ColorManager.rainbowSpeedValue.get(), + saturation: Float = ColorManager.rainbowSaturationValue.get(), + brightness: Float = ColorManager.rainbowBrightnessValue.get(), ): Color { return Color.getHSBColor((abs(((((System.currentTimeMillis() - startTime).toInt() + index * indexOffset) / timeSplit.toFloat()) % 2) - 1) * (bigest - lowest)) + lowest, saturation, brightness) } @@ -441,4 +441,16 @@ object ColorUtils { GL11.glColor4f(red, green, blue, alpha) } + fun applyOpacity(n: Int, f: Float): Int { + val color = Color(n) + return applyOpacity(color, f).getRGB() + } + + @JvmStatic + fun applyOpacity(color: Color, f: Float): Color { + var f = f + f = min(1.0, max(0.0, f.toDouble())).toFloat() + return Color(color.red, color.green, color.blue, (color.alpha.toFloat() * f).toInt()) + } + } diff --git a/src/main/resources/assets/minecraft/fdpclient/misc/LICENSE.txt b/src/main/resources/assets/minecraft/fdpclient/misc/LICENSE.txt deleted file mode 100644 index c29bf19fae..0000000000 --- a/src/main/resources/assets/minecraft/fdpclient/misc/LICENSE.txt +++ /dev/null @@ -1,673 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Copyright © CCBlueX 2015-2020 - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - Contact: support@liquidbounce.net - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright © CCBlueX 2015-2020 - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/src/main/resources/assets/minecraft/fdpclient/ui/clickgui/light/World.png b/src/main/resources/assets/minecraft/fdpclient/ui/clickgui/light/World.png deleted file mode 100644 index 86e3bae326..0000000000 Binary files a/src/main/resources/assets/minecraft/fdpclient/ui/clickgui/light/World.png and /dev/null differ