Skip to content

Commit

Permalink
2D正方形目标ESP Fix && Fucker Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XeContrast committed Nov 9, 2024
1 parent ce11769 commit c0cf366
Show file tree
Hide file tree
Showing 24 changed files with 408 additions and 192 deletions.
4 changes: 2 additions & 2 deletions src/main/java/cn/hanabi/gui/cloudmusic/MusicManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javafx.scene.media.MediaPlayer;
import net.ccbluex.liquidbounce.FDPClient;
import net.ccbluex.liquidbounce.event.EventTarget;
import net.ccbluex.liquidbounce.event.TickEvent;
import net.ccbluex.liquidbounce.event.GameTickEvent;
import net.ccbluex.liquidbounce.utils.ClientUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IImageBuffer;
Expand Down Expand Up @@ -311,7 +311,7 @@ public void play(Track track) throws Exception {
}

@EventTarget
public void onTick(TickEvent evt) {
public void onTick(GameTickEvent evt) {
if (this.getMediaPlayer() != null) {
long mill = (long) this.getMediaPlayer().getCurrentTime().toMillis();
if (!this.lrc.isEmpty()) {
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/net/ccbluex/liquidbounce/event/Events.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class SlowDownEvent(var strafe: Float, var forward: Float) : Event()
*/
class StrafeEvent(var strafe: Float, var forward: Float, var friction: Float, var yaw: Float) : CancellableEvent()

class RotationUpdateEvent : Event()

/**
* Called when an other entity moves
Expand Down Expand Up @@ -181,9 +182,13 @@ class TextEvent(var text: String?) : Event()
/**
* tick... tack... tick... tack
*/
class TickEvent : Event()

class GameTickEvent : Event()

/**
* tick tack for player
*/
class PlayerTickEvent(val state: EventState) : CancellableEvent()

/**
* Called when minecraft player will be updated
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
package net.ccbluex.liquidbounce.features.module.modules.client

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.TickEvent
import net.ccbluex.liquidbounce.event.GameTickEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo

@ModuleInfo(name = "NoAchievements", category = ModuleCategory.CLIENT, array = false, defaultOn = true)
object NoAchievements : Module() {
@EventTarget
fun onTick(event: TickEvent) {
fun onTick(event: GameTickEvent) {
mc.guiAchievement.clearAchievements()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ object TickBase : Module() {
playerTicks = 0
}
@EventTarget
fun onTick(event: TickEvent) {
fun onTick(event: GameTickEvent) {
if (onlykillaura.get() && !FDPClient.moduleManager[KillAura::class.java]!!.state) {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ object Velocity : Module() {
).displayable { mainMode.get() == "Other" }

private val horizontal = FloatValue("Horizontal", 0F, -1F, 1F).displayable {
mainMode.get() in arrayOf(
"AAC",
"Vanilla"
) && (vanillaMode.get() == "Simple")
mainMode.get() == "Vanilla" && (vanillaMode.get() == "Simple")
}
private val vertical = FloatValue("Vertical", 0F, -1F, 1F).displayable {
mainMode.get() in arrayOf(
Expand Down Expand Up @@ -340,6 +337,9 @@ object Velocity : Module() {
private var lastAttackTime = 0L
private var intaveDamageTick = 0

//KKCraft
private var lastGround = false

@EventTarget(priority = -1)
fun onPacket(event: PacketEvent) {
val packet = event.packet
Expand Down Expand Up @@ -553,8 +553,13 @@ object Velocity : Module() {
}
}

"intavereduce", "attackreduce", "grimvertical","kkcraft" -> hasReceivedVelocity = true
"intavereduce", "attackreduce", "grimvertical" -> hasReceivedVelocity = true

"kkcraft" -> {
hasReceivedVelocity = true
if (mc.thePlayer.onGround) lastGround = true
if (packet is S12PacketEntityVelocity) motionXZ = getMotionNoXZ(packet)
}
"phase" -> {
if (packet is S12PacketEntityVelocity) {
if (!mc.thePlayer.onGround && phaseOnlyGroundValue.get()) {
Expand Down Expand Up @@ -809,7 +814,7 @@ object Velocity : Module() {
}

@EventTarget
fun onTick(event: TickEvent) {
fun onTick(event: GameTickEvent) {
if (mainMode.get() == "Cancel" && cancelMode.get() == "GrimC07") {
if (hasReceivedVelocity || alwaysValue.get()) { // packet processed event pls
val pos = BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)
Expand Down Expand Up @@ -838,17 +843,20 @@ object Velocity : Module() {
}

"kkcraft" -> {
if (player.hurtTime in 3..8 && lastGround) {
player.motionX *= reduceAmount.get()
player.motionZ *= reduceAmount.get()
}
if (player.hurtTime == 0 && lastGround && player.onGround) {
lastGround = false
}
if (hasReceivedVelocity) {
if (player.hurtTime in 1..8) {
player.motionX *= reduceAmount.get()
player.motionZ *= reduceAmount.get()
}
if (player.hurtTime == 2 && player.onGround) {
if (player.hurtTime == 6 && player.onGround && !mc.gameSettings.keyBindJump.isKeyDown) {
player.jump()
player.motionX *= 0.3
player.motionZ *= 0.3
hasReceivedVelocity = false
player.motionX *= motionXZ
player.motionZ *= motionXZ
}
hasReceivedVelocity = false
}
}

Expand Down Expand Up @@ -1176,6 +1184,7 @@ object Velocity : Module() {

@EventTarget
override fun onDisable() {
lastGround = false
mc.timer.timerSpeed = 1f
flag = false
isMatrixOnGround = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ object ServerCrasher : Module() {
}

@EventTarget
fun onTick(event: TickEvent) {
fun onTick(event: GameTickEvent) {
if (mc.thePlayer == null || mc.theWorld == null) {
mc.timer.timerSpeed = 1.00f
state = false // Disable module in case you left the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ object Speed : Module() {
}

@EventTarget
fun onTick(event: TickEvent) {
fun onTick(event: GameTickEvent) {
if (mc.thePlayer.isSneaking || (mc.thePlayer.isInWater && noWater.get())) {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ object AntiBot : Module() {
private val removeFromWorld = BoolValue("RemoveFromWord", false)
private val debugValue = BoolValue("Debug", true)

private val kkBot = BoolValue("KKBot",false)
private val tabValue = BoolValue("Tab", true).displayable { modeValue.get() == "Custom"}
private val tabModeValue = ListValue("TabMode", arrayOf("Equals", "Contains"), "Contains").displayable { modeValue.get() == "Custom"}
private val entityIDValue = BoolValue("EntityID", true).displayable { modeValue.get() == "Custom"}
Expand Down Expand Up @@ -118,6 +119,7 @@ object AntiBot : Module() {
private val swing = mutableListOf<Int>()
private val invisible = mutableListOf<Int>()
private val hitted = mutableListOf<Int>()
private val KKList = mutableListOf<Int>()
private val spawnInCombat = mutableListOf<Int>()
private val notAlwaysInRadius = mutableListOf<Int>()
private val propertiesList = mutableSetOf<Int>()
Expand Down Expand Up @@ -224,6 +226,14 @@ object AntiBot : Module() {
for (bot in bots)
removeBot(bot)
}

if (kkBot.get()) {
mc.theWorld.playerEntities.forEach { player ->
if (player.inventory.armorInventory.all { it == null }) {
KKList.add(player.entityId)
}
}
}
}

private fun removeBot(bot: Entity) {
Expand All @@ -247,6 +257,9 @@ object AntiBot : Module() {
if (entity in botList)
return true

if (kkBot.get() && KKList.contains(entity.entityId))
return true

if (modeValue.get() != "Custom")
return false

Expand Down Expand Up @@ -635,6 +648,7 @@ object AntiBot : Module() {
hasRemovedEntities.clear()
matrix.clear()
propertiesList.clear()
KKList.clear()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import java.util.concurrent.ConcurrentHashMap

@ModuleInfo("AntiStaff", category = ModuleCategory.OTHER)
object AntiStaff : Module() {

const val CLIENT_CLOUD = "https://cloud.liquidbounce.net/LiquidBounce"

private val staffMode = object : ListValue("StaffMode", arrayOf("BlocksMC", "CubeCraft", "Gamster",
"AgeraPvP", "HypeMC", "Hypixel", "SuperCraft", "PikaNetwork", "GommeHD","KKCraft"), "BlocksMC") {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import net.minecraft.potion.Potion
import net.minecraft.util.EnumParticleTypes
import net.minecraft.util.MathHelper
import net.minecraft.util.ResourceLocation
import org.lwjgl.opengl.GL11
import java.awt.Color
import java.io.File
import java.io.IOException
Expand Down Expand Up @@ -171,16 +172,12 @@ object CombatVisuals : Module() {
)

"rectangle","round" -> {
// No null pointer anymore
auraESPAnim.setDirection(
if (!(combat.target!!.isDead || mc.thePlayer.getDistanceToEntity(
combat.target
) > 10)
) Direction.FORWARDS else Direction.BACKWARDS
)
if (!auraESPAnim.finished(Direction.BACKWARDS)) {
if (!(combat.target!!.isDead || mc.thePlayer.getDistanceToEntity(
combat.target
) > 10)
) {
val dst = mc.thePlayer.getSmoothDistanceToEntity(combat.target)
val vector2f = RenderUtil.targetESPSPos(combat.target, event.partialTicks) ?: return
val vector2f = RenderUtil.targetESPSPos(combat.target, event.partialTicks)
RenderUtil.drawTargetESP2D(
vector2f.x,
vector2f.y,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ class Particles : Module() {

private val physics = BoolValue("Physics", true)

private val startred = IntegerValue("StartRed", 255 ,0, 255)
private val startgreen = IntegerValue("StartGreen", 150 ,0, 255)
private val startblue = IntegerValue("StartBlue", 200 ,0, 255)
private val endred = IntegerValue("EndRed", 100 ,0, 255)
private val endgreen = IntegerValue("EndGreen", 110 ,0, 255)
private val endblue = IntegerValue("EndBlue", 195 ,0, 255)
private val startred = IntegerValue("StartRed", 255, 0, 255)
private val startgreen = IntegerValue("StartGreen", 150, 0, 255)
private val startblue = IntegerValue("StartBlue", 200, 0, 255)
private val endred = IntegerValue("EndRed", 100, 0, 255)
private val endgreen = IntegerValue("EndGreen", 110, 0, 255)
private val endblue = IntegerValue("EndBlue", 195, 0, 255)

private val particles: MutableList<Particle> = EvictingList(100)
private val timer = ParticleTimer()
Expand Down Expand Up @@ -69,6 +69,7 @@ class Particles : Module() {
target = null
}
}

private fun renderParticles(particles: List<Particle>) {
GL11.glEnable(GL11.GL_BLEND)
GL11.glDisable(GL11.GL_TEXTURE_2D)
Expand Down Expand Up @@ -112,7 +113,8 @@ class Particles : Module() {
0.0
)
val c = RenderUtils.getGradientOffset(
Color(startred.get(), startgreen.get(), startblue.get(), 1), Color(endred.get(), endgreen.get(), endblue.get(), 1),
Color(startred.get(), startgreen.get(), startblue.get(), 1),
Color(endred.get(), endgreen.get(), endblue.get(), 1),
(abs(
(System.currentTimeMillis() / 100 + (20 / 10)).toDouble()
) / 10)
Expand Down Expand Up @@ -151,25 +153,26 @@ class Particles : Module() {

@EventTarget
fun onRender3D(event: Render3DEvent?) {
if (particles.isEmpty()) return
if (particles.isNotEmpty()) {

var i = 0
while (i <= timer.elapsedTime / 1E+11) {
if (physics.get()) particles.forEach(Consumer { obj: Particle -> obj.update() })
else particles.forEach(Consumer { obj: Particle -> obj.updateWithoutPhysics() })
i++
}
var i = 0
while (i <= timer.elapsedTime / 1E+11) {
if (physics.get()) particles.forEach(Consumer { obj: Particle -> obj.update() })
else particles.forEach(Consumer { obj: Particle -> obj.updateWithoutPhysics() })
i++
}

particles.removeIf { particle: Particle ->
mc.thePlayer.getDistanceSq(
particle.position.xCoord,
particle.position.yCoord,
particle.position.zCoord
) > 50 * 10
}
particles.removeIf { particle: Particle ->
mc.thePlayer.getDistanceSq(
particle.position.xCoord,
particle.position.yCoord,
particle.position.zCoord
) > 50 * 10
}

timer.reset()
timer.reset()

renderParticles(particles)
renderParticles(particles)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ object FastBreak : Module() {
mc.playerController.curBlockDamageMP = 1F
}

if (Breaker.currentDamage > breakDamageValue.get()) {
Breaker.currentDamage = 1F
if (Fucker.currentDamage > breakDamageValue.get()) {
Fucker.currentDamage = 1F
}
}
}
Loading

0 comments on commit c0cf366

Please sign in to comment.