Skip to content

Commit

Permalink
Merge branch 'CCBlueX:nextgen' into feat/jsseq
Browse files Browse the repository at this point in the history
  • Loading branch information
MukjepScarlet authored Feb 24, 2025
2 parents 88eba9a + f6919d2 commit db441bf
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 43 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ dependencies {
includeDependency "org.ahocorasick:ahocorasick:0.6.3"

// Test libraries
testImplementation "org.junit.jupiter:junit-jupiter:5.11.3"
testImplementation "org.junit.jupiter:junit-jupiter:5.12.0"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"

// Fix nullable annotations
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ mc_authlib_version=1.4.1
mod_menu_version=13.0.0-beta.1
sodium_version=mc1.21.4-0.6.6-fabric
lithium_version=mc1.21.4-0.14.3-fabric
viafabricplus_version=4.0.1
viafabricplus_version=4.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import net.minecraft.text.Text
import net.minecraft.util.Formatting

object ModuleLiquidChat : ClientModule("LiquidChat", Category.CLIENT, hide = true, state = true,
aliases = arrayOf("GlobalChat")) {
aliases = arrayOf("GlobalChat", "IRC")) {

private var jwtToken by text("JwtToken", "")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket
* Modifies the amount of velocity you take.
*/

object ModuleVelocity : ClientModule("Velocity", Category.COMBAT) {
object ModuleVelocity : ClientModule("Velocity", Category.COMBAT, aliases = arrayOf("AntiKnockBack")) {

init {
enableLock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ object ModuleKick : ClientModule("Kick", Category.EXPLOIT, disableActivation = t
*/
fun kick(mode: KickModeEnum) = mode.run()

@Suppress("unused")
enum class KickModeEnum(override val choiceName: String, val run: () -> Unit) : NamedChoice {
QUIT("Quit", {
world.disconnect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private const val MAX_SIMULATED_TICKS = 240
*
* @author sqlerrorthing
*/
object ModuleAutoPearl : ClientModule("AutoPearl", Category.MISC, aliases = arrayOf("PearlFollower")) {
object ModuleAutoPearl : ClientModule("AutoPearl", Category.MISC, aliases = arrayOf("PearlFollower", "PearlTarget")) {

private val mode by enumChoice("Mode", Modes.TRIGGER)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import net.ccbluex.liquidbounce.features.module.modules.movement.terrainspeed.ic
*
* Move faster on specific surfaces.
*/
object ModuleTerrainSpeed : ClientModule("TerrainSpeed", Category.MOVEMENT) {
object ModuleTerrainSpeed : ClientModule("TerrainSpeed", Category.MOVEMENT, aliases = arrayOf("FastClimb")) {

init {
enableLock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ import net.ccbluex.liquidbounce.utils.kotlin.EventPriorityConvention
*
* Legit trick to build faster.
*/
object ModuleEagle : ClientModule("Eagle", Category.PLAYER, aliases = arrayOf("FastBridge", "BridgeAssistant")) {
object ModuleEagle : ClientModule("Eagle", Category.PLAYER,
aliases = arrayOf("FastBridge", "BridgeAssistant", "LegitScaffold")
) {

private val edgeDistance by float("EagleEdgeDistance", 0.4f, 0.01f..1.3f)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket
* Allows you to use items faster.
*/

object ModuleFastUse : ClientModule("FastUse", Category.PLAYER) {
object ModuleFastUse : ClientModule("FastUse", Category.PLAYER, aliases = arrayOf("FastEat")) {

private val modes = choices("Mode", Immediate, arrayOf(Immediate, ItemUseTime)).apply { tagBy(this) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import net.minecraft.screen.slot.SlotActionType
*
* @author ccetl
*/
object ModuleReplenish : ClientModule("Replenish", Category.PLAYER) {
object ModuleReplenish : ClientModule("Replenish", Category.PLAYER, aliases = arrayOf("Refill")) {

private val constraints = tree(PlayerInventoryConstraints())
private val itemThreshold by int("ItemThreshold", 5, 0..63)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.modes.A
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.modes.AutoQueueHypixelSW
import net.ccbluex.liquidbounce.features.module.modules.player.autoqueue.modes.AutoQueuePaper

object ModuleAutoQueue : ClientModule("AutoQueue", Category.PLAYER) {
object ModuleAutoQueue : ClientModule("AutoQueue", Category.PLAYER, aliases = arrayOf("AutoPlay")) {
val modes = choices("Mode", AutoQueuePaper, arrayOf(
AutoQueuePaper,
AutoQueueHypixelSW,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ import net.minecraft.screen.slot.SlotActionType
*
* Automatically throws away useless items and sorts them.
*/
object ModuleInventoryCleaner : ClientModule("InventoryCleaner", Category.PLAYER) {

object ModuleInventoryCleaner : ClientModule("InventoryCleaner", Category.PLAYER,
aliases = arrayOf("InventoryManager")
) {

private val inventoryConstraints = tree(PlayerInventoryConstraints())

private val maxBlocks by int("MaximumBlocks", 512, 0..2500)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import net.minecraft.util.math.RotationAxis
* Please credit from where you got the animation from and make sure they are willing to contribute.
* If they are not willing to contribute, please do not add the animation to this module.
*/
object ModuleAnimations : ClientModule("Animations", Category.RENDER) {
@Suppress("MagicNumber")
object ModuleAnimations : ClientModule("Animations", Category.RENDER, aliases = arrayOf("ViewModel")) {

init {
tree(MainHand)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import net.ccbluex.liquidbounce.features.module.ClientModule
*
* Protects you from potentially annoying screen effects that block your view.
*/
object ModuleAntiBlind : ClientModule("AntiBlind", Category.RENDER) {
object ModuleAntiBlind : ClientModule("AntiBlind", Category.RENDER, aliases = arrayOf("NoRender")) {
val antiBlind by boolean("DisableBlindingEffect", true)
val antiDarkness by boolean("DisableDarknessEffect", true)
val antiNausea by boolean("DisableNauseaEffect", true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import org.lwjgl.opengl.GL13
*
* Override the ambience of the game
*/
object ModuleCustomAmbience : ClientModule("CustomAmbience", Category.RENDER) {
object ModuleCustomAmbience : ClientModule("CustomAmbience", Category.RENDER, aliases = arrayOf("FogChanger")) {

val weather = enumChoice("Weather", WeatherType.SNOWY)
private val time = enumChoice("Time", TimeType.NIGHT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import net.ccbluex.liquidbounce.utils.client.chat
import net.ccbluex.liquidbounce.utils.client.inGame
import net.ccbluex.liquidbounce.utils.client.markAsError
import net.ccbluex.liquidbounce.utils.entity.RenderedEntities
import net.minecraft.client.MinecraftClient
import net.minecraft.client.gui.screen.DisconnectedScreen

/**
Expand Down Expand Up @@ -67,10 +66,7 @@ object ModuleHud : ClientModule("HUD", Category.RENDER, state = true, hide = tru
}

val isBlurable
get() = blur && !(mc.options.hudHidden && mc.currentScreen == null) &&
// Only blur on Windows and Linux - Mac seems to have issues with it
// TODO: fix blur on macOS
!MinecraftClient.IS_SYSTEM_MAC
get() = blur && !(mc.options.hudHidden && mc.currentScreen == null)

init {
tree(Configurable("In-built", value = components as MutableList<Value<*>>))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,13 @@ object ModuleScaffold : ClientModule("Scaffold", Category.WORLD) {

val blockCount: Int
get() {
val blockInMainHand = player.inventory.getStack(player.inventory.selectedSlot)
val blockInOffHand = player.offHandStack
fun ItemStack.blockCount() = if (isValidBlock(this)) this.count else 0

val blocks = hashSetOf(blockInMainHand, blockInOffHand)

if (ScaffoldAutoBlockFeature.enabled) {
findPlaceableSlots().mapTo(blocks) { it.value() }
return player.offHandStack.blockCount() + if (ScaffoldAutoBlockFeature.enabled) {
findPlaceableSlots().sumOf { it.value().blockCount() }
} else {
player.inventory.getStack(player.inventory.selectedSlot).blockCount()
}

return blocks.sumOf { if (isValidBlock(it)) it.count else 0 }
}

val isBlockBelow: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object ScaffoldGodBridgeTechnique : ScaffoldTechnique("GodBridge"), ScaffoldLedg

private var mode by enumChoice("Mode", Mode.JUMP)
private var forceSneakBelowCount by int("ForceSneakBelowCount", 3, 0..10)
private var sneakTime by int("SneakTime", 1, 1..10)
private val sneakTime by intRange("SneakTime", 1..1, 1..10)

override fun ledge(
target: BlockPlacementTarget?,
Expand Down Expand Up @@ -103,16 +103,16 @@ object ScaffoldGodBridgeTechnique : ScaffoldTechnique("GodBridge"), ScaffoldLedg
// we need to prevent the player from falling off the ledge e.g by jumping or sneaking.
when {
ModuleScaffold.blockCount < forceSneakBelowCount -> {
LedgeAction(sneakTime = this@ScaffoldGodBridgeTechnique.sneakTime)
LedgeAction(sneakTime = sneakTime.random())
}
mode == Mode.JUMP -> LedgeAction(jump = true)
mode == Mode.SNEAK -> LedgeAction(sneakTime = this@ScaffoldGodBridgeTechnique.sneakTime)
mode == Mode.SNEAK -> LedgeAction(sneakTime = sneakTime.random())
mode == Mode.STOP_INPUT -> LedgeAction(stopInput = true)
mode == Mode.BACKWARDS -> LedgeAction(stepBack = true)
mode == Mode.RANDOM -> if (Random.nextBoolean()) {
LedgeAction(jump = true, sneakTime = 0)
} else {
LedgeAction(jump = false, sneakTime = this@ScaffoldGodBridgeTechnique.sneakTime)
LedgeAction(jump = false, sneakTime = sneakTime.random())
}
else -> LedgeAction.NO_LEDGE
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,20 @@ class LeastDifferencePreference(
return eyesPos + baseRotation.directionVector * range
}

override fun getPreferredSpotOnBox(box: Box, eyesPos: Vec3d, range: Double): Vec3d? {
override fun getPreferredSpotOnBox(box: Box, eyesPos: Vec3d, range: Double): Vec3d {
if (basePoint != null) {
return basePoint
}

if (box.contains(eyesPos)) {
return eyesPos
}

val preferredSpot = getPreferredSpot(eyesPos, range)
if (box.contains(preferredSpot)) {
return preferredSpot
}

val look = Line(eyesPos, preferredSpot - eyesPos)
return look.getPointOnBoxInDirection(box)?.takeIf { it.squaredDistanceTo(eyesPos) <= range.sq() }
return look.getPointOnBoxInDirection(box)
?.takeIf { it.squaredDistanceTo(eyesPos) <= range.sq() }
?: preferredSpot
}

override fun compare(o1: Rotation, o2: Rotation): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface RotationPreference : Comparator<Rotation> {

fun getPreferredSpot(eyesPos: Vec3d, range: Double, ): Vec3d

fun getPreferredSpotOnBox(box: Box, eyesPos: Vec3d, range: Double): Vec3d? {
fun getPreferredSpotOnBox(box: Box, eyesPos: Vec3d, range: Double): Vec3d {
return getPreferredSpot(eyesPos, range)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ fun raytraceBox(
val rangeSquared = range * range
val wallsRangeSquared = wallsRange * wallsRange

val preferredSpot = rotationPreference.getPreferredSpotOnBox(box, eyes, range) ?: return null
val preferredSpot = rotationPreference.getPreferredSpotOnBox(box, eyes, range)
val preferredSpotOnBox = if (box.contains(eyes) && box.contains(preferredSpot)) {
preferredSpot
} else {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/resources/liquidbounce/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@
"liquidbounce.module.nametags.description": "Improves the visibility of player's name tags and show additional information.",
"liquidbounce.module.itemTags.description": "Display icons and quantities labels for dropped items.",
"liquidbounce.module.noBob.description": "Disables the view bobbing effect.",
"liquidbounce.module.phase.description": "Allows you to phase through blocks by exploiting the anti-cheat.",
"liquidbounce.module.noClip.description": "Allows you to move through blocks (let a sand block drop on your head first).",
"liquidbounce.module.noClip.messages.setbackDetected": "You have been set back by the server! Make sure you are already standing inside of a block.",
"liquidbounce.module.noFOV.description": "Disables FOV from changing during movement",
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/resources/liquidbounce/shaders/sobel.vert
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#version 150
#version 410 core

in vec4 Position;
in vec2 UV0;
layout (location = 0) in vec4 Position;
layout (location = 1) in vec2 UV0;

out vec2 fragTexCoord;

Expand Down

0 comments on commit db441bf

Please sign in to comment.