Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
2f68230 & 95e7485
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Feb 25, 2024
1 parent cc0c9b2 commit 96a81aa
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ object Velocity : Module("Velocity", ModuleCategory.COMBAT) {
val tickreduceVertical by BoolValue("TickReduce-Vertical", false) { mode == "Custom" && tickreduce }
val tickreduceHorizontal by BoolValue("TickReduce-Horizontal", false) { mode == "Custom" && tickreduce }
val reverse by BoolValue("Reverse", false) { mode == "Custom" }
val onLook by BoolValue("onLook", false) { reverse }
val range by FloatValue("Range", 3.0F, 1F..5.0F) { onLook && reverse }
val maxAngleDifference by FloatValue("MaxAngleDifference", 45.0f, 5.0f..90f) { onLook && reverse }
val reverseSmooth by BoolValue("Reverse-Smooth", false) { mode == "Custom" && reverse }
val reverseNoGround by BoolValue("Reverse-NoGround", true) { mode == "Custom" && reverse }
val reverseTicks by IntegerValue("Reverse-StrafeTicks", 1, 1..20) { mode == "Custom" && reverse }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.horizont
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.jump
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.jumpFailRate
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.jumpMotion
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.maxAngleDifference
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.onLook
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.range
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.reverse
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.reverseNoGround
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.reverseSmooth
Expand All @@ -28,9 +31,12 @@ import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.tickredu
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.velocityTick
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity.verticalMultiplier
import net.ccbluex.liquidbounce.features.module.modules.combat.velocitymodes.VelocityMode
import net.ccbluex.liquidbounce.utils.EntityUtils.isLookingOnEntities
import net.ccbluex.liquidbounce.utils.EntityUtils.isSelected
import net.ccbluex.liquidbounce.utils.MovementUtils.speed
import net.ccbluex.liquidbounce.utils.extensions.jump
import net.ccbluex.liquidbounce.utils.extensions.*
import net.ccbluex.liquidbounce.utils.misc.RandomUtils
import net.minecraft.entity.Entity
import net.minecraft.network.play.server.S12PacketEntityVelocity

/**
Expand Down Expand Up @@ -60,17 +66,30 @@ object Custom : VelocityMode("Custom") {
}

override fun onUpdate() {
if (jump && mc.thePlayer.hurtTime == 9 && RandomUtils.nextInt(1, 100) > jumpFailRate) {
if (jump && mc.thePlayer.hurtTime == 9 && RandomUtils.nextInt(1, 100) > jumpFailRate)
mc.thePlayer.jump(jumpMotion)
}
if (reverse && !(reverseNoGround && mc.thePlayer.onGround)) {
if (reverseTicks > velocityTick) {
if (reverseSmooth) mc.thePlayer.speedInAir = reverseStrength
else speed *= reverseStrength
} else if (reverseSmooth) mc.thePlayer.speedInAir = 0.02f
run {
val nearbyEntity = getNearestEntityInRange() ?: return@run

if (onLook && !isLookingOnEntities(nearbyEntity, maxAngleDifference.toDouble())) {
if (reverseSmooth)
mc.thePlayer.speedInAir = 0.02f
return@run
}

if (reverseTicks > velocityTick)
if (reverseSmooth)
mc.thePlayer.speedInAir = reverseStrength
else
speed *= reverseStrength
else if (reverseSmooth)
mc.thePlayer.speedInAir = 0.02f
}
}
if (tickreduce && tickreduceTicks == velocityTick) {
if (tickreduceVertical) mc.thePlayer.motionY *= tickreduceMultiplier
if (tickreduceVertical)
mc.thePlayer.motionY *= tickreduceMultiplier
if (tickreduceHorizontal) {
mc.thePlayer.motionX *= tickreduceMultiplier
mc.thePlayer.motionZ *= tickreduceMultiplier
Expand All @@ -79,8 +98,25 @@ object Custom : VelocityMode("Custom") {
}

override fun onAttack() {
if (mc.thePlayer.hurtTime < 3 || !attackReduce) return
mc.thePlayer.motionX *= attackReduceMultiplier
mc.thePlayer.motionZ *= attackReduceMultiplier
if (mc.thePlayer.hurtTime >= 3 && attackReduce) {
mc.thePlayer.motionX *= attackReduceMultiplier
mc.thePlayer.motionZ *= attackReduceMultiplier
}
}

private fun getAllEntities(): List<Entity> {
return mc.theWorld.loadedEntityList
.filter { isSelected(it, true) }
.toList()
}

private fun getNearestEntityInRange(): Entity? {
val entitiesInRange = getAllEntities()
.filter {
val distance = mc.thePlayer.getDistanceToEntityBox(it)
(distance <= range)
}

return entitiesInRange.minByOrNull { mc.thePlayer.getDistanceToEntityBox(it) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"module.autoBreak.description": "Автоматично чупи блока, който гледате.",

"module.autoFish.description": "Автоматично улавя риба при използване на въдица.",

"module.autoProjectile.description": "UNTRANSLATED: Automatically throws egg/snowball.",
"module.autoRespawn.description": "Автоматично ви преражда, след като умрете.",

"module.autoTool.description": "Автоматично избира най-добрия инструмент във вашия инвентар, за да изкопае блок.",
Expand Down Expand Up @@ -182,7 +182,7 @@
"module.itemESP.description": "Позволява ви да виждате предмети през стени.",

"module.itemTeleport.description": "Позволява ви да взимате предмети от далеч.",

"module.itemPhysics.description": "UNTRANSLATED: Allows dropped items to have physics",
"module.keepAlive.description": "Опитва се да ви попречи да умрете.",

"module.keepContainer.description": "Позволява ви да отворите бивш затворен контейнер за инвентаризация навсякъде. (Натиснете клавиша INSERT, за да отворите)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"module.autoBreak.description": "Quebra automaticamente o bloco que você está olhando.",

"module.autoFish.description": "Pesca automaticamente ao usar uma vara de pesca.",

"module.autoProjectile.description": "UNTRANSLATED: Automatically throws egg/snowball.",
"module.autoRespawn.description": "Faz você ressurgir automaticamente após a morte.",

"module.autoTool.description": "Seleciona automaticamente a melhor ferramenta em seu inventário para minerar um bloco.",
Expand Down Expand Up @@ -180,7 +180,7 @@
"module.itemESP.description": "Permite que você veja itens através de paredes.",

"module.itemTeleport.description": "Permite que você pegue itens à distância.",

"module.itemPhysics.description": "UNTRANSLATED: Allows dropped items to have physics",
"module.keepAlive.description": "Tenta impedir que você morra.",

"module.keepContainer.description": "Permite que você abra um contêiner de inventário anteriormente fechado em qualquer lugar. (Pressione a tecla INSERT para abrir)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"module.autoBreak.description": "Automaticamente quebra o bloco que estás a olhar em.",

"module.autoFish.description": "UNTRANSLATED: Automatically catches fish when using a rod.",

"module.autoProjectile.description": "UNTRANSLATED: Automatically throws egg/snowball.",
"module.autoRespawn.description": "UNTRANSLATED: Automatically respawns you after dying.",

"module.autoTool.description": "Automaticamente seleciona o melhor instrumento no teu inventário para destruir um bloco.",
Expand Down Expand Up @@ -179,7 +179,7 @@
"module.itemESP.description": "Permite que tu vejas itens através de paredes.",

"module.itemTeleport.description": "Permie que tu adquires blocos longe.",

"module.itemPhysics.description": "UNTRANSLATED: Allows dropped items to have physics",
"module.keepAlive.description": "Tenta prevenir que tu morras.",

"module.keepContainer.description": "UNTRANSLATED: Allows you to open a formerly closed inventory container everywhere. (Press INSERT Key to open)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"module.autoBreak.description": "Автоматически ломает блок, на который смотрите.",

"module.autoFish.description": "Автоматически ловит рыбу",

"module.autoProjectile.description": "UNTRANSLATED: Automatically throws egg/snowball.",
"module.autoRespawn.description": "Автоматическое возраждение после смерти.",

"module.autoTool.description": "Автоматически выбирает инструмент из хотбара для ломания блока.",
Expand Down Expand Up @@ -182,7 +182,7 @@
"module.itemESP.description": "Позволяет видеть лут сквозь стены.",

"module.itemTeleport.description": "Позволяет подбирать лут издалека.",

"module.itemPhysics.description": "UNTRANSLATED: Allows dropped items to have physics",
"module.keepAlive.description": "Пытается не дать вам умереть",

"module.keepContainer.description": "Позволяет открыть ранее закрытый инвентарь в любом месте. (Для открытия нажать INSERT)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"module.autoBreak.description": "自动破坏你瞄准的方块。",

"module.autoFish.description": "切换到鱼竿时自动钓鱼。",

"module.autoProjectile.description": "自动扔鸡蛋/雪球。",
"module.autoRespawn.description": "死后自动重生。",

"module.autoTool.description": "挖方块时自动切换到快捷栏中最合适的工具。",
Expand Down Expand Up @@ -183,7 +183,7 @@
"module.itemESP.description": "允许你透过墙壁看到物品。",

"module.itemTeleport.description": "允许你捡起远处的物品。",

"module.itemPhysics.description": "使掉落物具有物理特性。",
"module.keepAlive.description": "尝试防止你死去。",

"module.keepContainer.description": "允许你在任何位置打开上次关闭的容器 (按INSERT键打开)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"module.ambience.description": "改變世界時間和天氣。(視覺上)",
"module.antiHunger.description": "防止飢餓。",
"module.bedGodMode.description": "允許你躺在床上四處走動。(對於1.9)",
"module.bedProtectionESP.description": "讓您了解應該將方塊放置在哪裡來保護床",
"module.bedProtectionESP.description": "幫助你找到保護床所需放置方塊的位置。",
"module.clip.description": "允許你clip通過方塊。",
"module.airJump.description": "允許你在空中跳躍。",
"module.airLadder.description": "允許你在爬上懸空的藤蔓或梯子。",
Expand All @@ -51,6 +51,7 @@
"module.autoAccount.description": "功能豐富的自動註冊/登入和帳號管理員。",
"module.autoBreak.description": "自動破壞你瞄準的方塊。",
"module.autoFish.description": "切換到釣竿時自動釣魚。",
"module.autoProjectile.description": "自動扔雞蛋/雪球。",
"module.autoRespawn.description": "死後自動重生。",
"module.autoTool.description": "挖方塊時自動切換到快速列中最合適的工具。",
"module.autoWalk.description": "持續前進。",
Expand Down Expand Up @@ -97,6 +98,7 @@
"module.inventoryMove.description": "允許你在打開背包時行走。",
"module.itemESP.description": "允許你透過牆壁看到物品。",
"module.itemTeleport.description": "允許你撿起遠處的物品。",
"module.itemPhysics.description": "使掉落物具有物理特性。",
"module.keepAlive.description": "試著防止你死去。",
"module.keepContainer.description": "允許你在任何位置打開上次關閉的容器 (按INSERT鍵打開)",
"module.keyPearl.description": "允許你使用快捷鍵扔出在快捷欄中的末影珍珠。",
Expand Down Expand Up @@ -169,6 +171,7 @@
"module.waterSpeed.description": "允許你游得更快。",
"module.xRay.description": "允許你透過牆壁看到礦石。",
"module.zoot.description": "移除所有負面藥水效果/火焰。",
"module.disabler.description": "停用伺服器或特定的反作弊偵測"
"module.keepSprint.description": "允許你在攻擊後不打斷疾跑。",
"module.disabler.description": "使你免受伺服器或特定反作弊的作弊檢測。"
}
}

0 comments on commit 96a81aa

Please sign in to comment.