Aimbot->AimAssist.News StrafenIncrease Module CheckBlockBreak Module AimWhileonTarget Module Invisible Module.
-
object AimAssist : Module("AimAssist", ModuleCategory.COMBAT) {
private val range by FloatValue("Range", 4.4F, 1F..8F) private val turnSpeed by FloatValue("TurnSpeed", 10f, 1F..360F) private val inViewTurnSpeed by FloatValue("InViewTurnSpeed", 35f, 1f..360f) private val fov by FloatValue("FOV", 180F, 1F..360F) private val center by BoolValue("Center", false) private val lock by BoolValue("Lock", true) private val onClick by BoolValue("OnClick", false) private val jitter by BoolValue("Jitter", false) internal val strafeincrease by BoolValue("StrafenIncrease",false) val checkblockbreak by BoolValue("CheckBlockBreak",false) internal val aimwhileontarget by BoolValue("AimWhileonTarget",false) val invisible by BoolValue("Invisible",false) private val clickTimer = MSTimer() @EventTarget fun onMotion(event: MotionEvent) { if (event.eventState != EventState.POST) return val thePlayer = mc.thePlayer ?: return // Clicking delay if (mc.gameSettings.keyBindAttack.isKeyDown) clickTimer.reset() if (onClick && (clickTimer.hasTimePassed(150) || (!mc.gameSettings.keyBindAttack.isKeyDown && handleEvents()))) return // Search for the best enemy to target val entity = mc.theWorld.loadedEntityList.filter { val distanceCheck = Backtrack.getNearestTrackedDistance(it) return@filter isSelected(it, true) && thePlayer.canEntityBeSeen(it) && thePlayer.getDistanceToEntityBox(it) <= range || distanceCheck != 0.0 && distanceCheck <= range && getRotationDifference(it) <= fov }.minByOrNull { mc.thePlayer.getDistanceToEntityBox(it) } ?: return // Should it always keep trying to lock on the enemy or just try to assist you? if (!lock && isFaced(entity, range.toDouble())) return val random = Random() var shouldReturn = false Backtrack.runWithNearestTrackedDistance(entity) { shouldReturn = !findRotation(entity, random) } if (shouldReturn) { return } // Jitter // Some players do jitter on their mouses causing them to shake around. This is trying to simulate this behavior. if (jitter) { if (random.nextBoolean()) { thePlayer.fixedSensitivityYaw += (random.nextGaussian() - 0.5f).toFloat() } if (random.nextBoolean()) { thePlayer.fixedSensitivityPitch += (random.nextGaussian() - 0.5f).toFloat() } } } private fun findRotation(entity: Entity, random: Random): Boolean { val thePlayer = mc.thePlayer ?: return false val entityPrediction = Vec3(entity.posX - entity.prevPosX, entity.posY - entity.prevPosY, entity.posZ - entity.prevPosZ ).times(1.5) // Look up required rotations to hit enemy val boundingBox = entity.hitBox.offset( entityPrediction.xCoord, entityPrediction.yCoord, entityPrediction.zCoord ) val playerRotation = thePlayer.rotation val destinationRotation = if (center) toRotation(getCenter(boundingBox), true) else searchCenter(boundingBox, outborder = false, random = false, predict = true, lookRange = range, attackRange = if (handleEvents()) Reach.combatReach else 3f ) ?: return false // Figure out the best turn speed suitable for the distance and configured turn speed val rotationDiff = getRotationDifference(playerRotation, destinationRotation) // is enemy visible to player on screen. Fov is about to be right with that you can actually see on the screen. Still not 100% accurate, but it is fast check. val supposedTurnSpeed = if (rotationDiff < mc.gameSettings.fovSetting) { inViewTurnSpeed } else { turnSpeed } val gaussian = random.nextGaussian() val realisticTurnSpeed = rotationDiff * ((supposedTurnSpeed + (gaussian - 0.5)) / 180) val rotation = limitAngleChange(thePlayer.rotation, destinationRotation, realisticTurnSpeed.toFloat()) rotation.toPlayer(thePlayer) return true }
}
// StrafeIncrease fun <Player : Any> handleStrafeIncrease(player: Player, moveSpeed: Double) { if (strafeincrease) { moveSpeed * 0.01 } else { resetPlayerDirection(player) } } // Reset player direction if not strafeincrease private fun resetPlayerDirection(player: Any) { with(player) { setlocation() }; } fun setlocation() { if (mc.thePlayer != null) { mc.thePlayer.setlocation() }
}
private fun EntityPlayerSP.setlocation() { if (mc.thePlayer != null) { mc.thePlayer.setlocation() }
}
fun getEyeInWorldLocationplayer() { if (mc.thePlayer != null) { mc.thePlayer.getEyeInWorldLocation() }
}
private fun EntityPlayerSP.getEyeInWorldLocation() { if (mc.thePlayer != null) { }
}
@EventTarget fun onBlockBreak(event: BlockBreakEvent) { if (checkblockbreak && event.player == mc.thePlayer) { aimAssistEnabled = false } }
interface BlockBreakEvent {
val player: Any
}
fun onBlockBreakingStop(player: EntityPlayerSP) {
aimAssistEnabled = true
}// AimWhileOnTarget fun handleAimAssist() { if (aimwhileontarget) { if (!aimAssistEnabled) { aimAssistEnabled = ture } } else { aimAssistEnabled = false } }
val ture: Boolean = true
var aimAssistEnabled: Boolean = true
var aimwhileontarget: Boolean = false
// Handle player aim assist status
fun handleAimAssistStatus() {
if (aimAssistEnabled) {
aimAssistEnabled = false
} else {
aimAssistEnabled = true
}
}@EventTarget
fun onRender(event: RenderEvent) {
if (invisible) {
mc.thePlayer.isInvisible = true
} else {
mc.thePlayer.isInvisible = false
}
}interface RenderEvent { fun onRender()
}
-
are you trying to suggest changing aimbot module name to aimassist?
-
@EclipsesDev
yes -
@EclipsesDev
AutoClicker,News InventoryFill,Module.
private val inventoryFill by BoolValue("InventoryFill", false)private fun inventoryFill() {
if (mc.thePlayer.inventory.currentItem == 36) {
mc.thePlayer.inventory.currentItem = 0
for (i in 0 until 36) {
mc.thePlayer.inventory.currentItem = i
if (mc.thePlayer.inventory.getStackInSlot(i).isEmpty()) {
mc.thePlayer.inventory.currentItem = i
mc.thePlayer.inventory.currentItem = 36
return
}
if (i == 35) {
mc.thePlayer.inventory.currentItem = 36
return
}
inventoryFill()
if (mc.thePlayer.inventory.currentItem == 36) {
mc.thePlayer.inventory.currentItem = 0
return
}
}
}Hitselect
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.modules.combat.AimAssist.checkblockbreak
import net.ccbluex.liquidbounce.features.module.modules.combat.HitSelect.attackEntity
import net.ccbluex.liquidbounce.features.module.modules.combat.HitSelect.tick
import net.ccbluex.liquidbounce.utils.MinecraftInstance.Companion.mc
import net.ccbluex.liquidbounce.utils.timing.MSTimer
import net.ccbluex.liquidbounce.value.IntegerValue
import net.ccbluex.liquidbounce.value.ListValue
import net.minecraft.util.MovingObjectPosition
import net.minecraft.world.Worldobject HitSelect : Module("HitSelect", ModuleCategory.COMBAT) {
private val modeOptions by lazy { arrayOf("Simple", "Active", "Legit", "Pause") }
private val mode by ListValue("Mode", modeOptions, "Simple")
private val delay by IntegerValue("Delay", 10, 1..100)
val tick by IntegerValue("Tick", 4, 1..20)
private val chance by IntegerValue("Chance", 100, 1..100)private val timer = MSTimer() override fun onEnable() { timer.reset() } private fun onUpdate() { if (timer.hasReached(delay)) { timer.reset() processMouseOver<Any>(mode) } } fun attackEntity() { }
}
private fun <ClientPlayerEntity : Any> processMouseOver(mode: String) {
val world = mc.theWorld as World
val player = mc.thePlayer as ClientPlayerEntitywhen (mode) { "Simple", "Active", "Pause" -> processSimpleClick(world, mc.objectMouseOver) "Legit" -> { processComplexClick() mc.objectMouseOver.entityHit?.let { attackEntity() } processBlockClickIfNeeded() } else -> handleUnexpectedMode(mode) }
}
fun processBlockClickIfNeeded() {
if (checkblockbreak) {
}
}private fun processComplexClick() {
if (mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mc.objectMouseOver.entityHit?.let {
attackEntity()
}
}
}private fun spawnEntity() {
}private var Unit.value: Any
get() {
return Unit
}
set(value) {}
private val Int.value: Any
get() {
return value
}
private val pos: Any = TODO()private val createEntityFromHitEntityOrBlock: Any
get() {
return if (mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mc.objectMouseOver.entityHit
} else {
mc.objectMouseOver
}
}private fun playEvent() {
if (mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mc.objectMouseOver.entityHit?.let {
attackEntity()
}
}
}private fun processSimpleClick(world: World, mo: MovingObjectPosition?) {
if (mo != null) {
spawnEntity()
playEvent()
}
processLeftClick()
}private fun processLeftClick() {
mc.thePlayer?.let {
attackTargetEntityFromPlayer()
}
}private fun attackTargetEntityFromPlayer() {
}private fun processComplexClick(world: World, player: ClientPlayerEntity, mo: MovingObjectPosition?) {
processSimpleClick(world, mo)
if (mo != null) {
if (mo.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mc.objectMouseOver.entityHit?.let {
attackEntity()
}
}
fun processComplexClick() {
processLeftClickForEntity(world, player, mo)
if (mo.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mc.objectMouseOver.entityHit?.let {
attackEntity()
}
}
}
}
}interface ClientPlayerEntity
private fun processBlockClickIfNeeded(world: World, player: ClientPlayerEntity, mo: MovingObjectPosition?) {
if (mo != null) {
if (mo.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
processSimpleClick(world, mo)
}
}
}private fun processLeftClickForEntity(world: World, player: ClientPlayerEntity, mo: MovingObjectPosition?) {
processSimpleClick(world, mo)
if (mo != null) {
if (mo.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
mo.entityHit?.let {
attackEntity()
}
}
}
}private fun handleUnexpectedMode(mode: String) {
println("Unhandled mode: $mode")
// Add any additional error handling here
}fun updateTick() {
val currentTick = tick.value
if (currentTick == 0) {
if (mc.theWorld != null && mc.thePlayer != null && mc.objectMouseOver != null) {
processMouseOver<Any>(mode as String)
}
updateTick()
if (currentTick < tick.value) {
return
}
return
}
}fun updateChance(newChanceValue: Int) {
if (newChanceValue in 1..100) {
chance().value = newChanceValue
} else {
println("Invalid value for chance. It should be between 1 and 100.")
}
}Reach
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.modules.player.Reach.SprintOnly
import net.ccbluex.liquidbounce.features.module.modules.player.Reach.chance
import net.ccbluex.liquidbounce.features.module.modules.player.Reach.hitThroughBlocks
import net.ccbluex.liquidbounce.features.module.modules.player.Reach.movingOnly
import net.ccbluex.liquidbounce.utils.MinecraftInstance.Companion.mc
import net.ccbluex.liquidbounce.value.BoolValue
import net.ccbluex.liquidbounce.value.FloatValue
import net.ccbluex.liquidbounce.value.IntegerValue
import kotlin.math.max
import kotlin.math.min
import kotlin.random.Randomobject Reach : Module("Reach", ModuleCategory.PLAYER) {
val combatReach by FloatValue("CombatReach", 3.5f, 3f..7f)
val buildReach by FloatValue("BuildReach", 5f, 4.5f..7f)
val chance by IntegerValue("Chance", 100, 0..100)
val movingOnly by BoolValue("MovingOnly", false)
val SprintOnly by BoolValue("SprintOnly", false)
val hitThroughBlocks by BoolValue("HitThroughBlocks", false)val maxRange get() = max(combatReach, buildReach) val minRange get() = min(combatReach, buildReach)
}
fun shouldTriggerSpecialEffect(): Boolean {
val randomChance = Random.nextDouble() * 100.0
return randomChance <= chance
}fun shouldTriggerReach(): Boolean { return shouldTriggerSpecialEffect() && (mc.thePlayer.isSprinting || !SprintOnly.get()) && (mc.thePlayer.onGround || !movingOnly.get()) && (mc.thePlayer.isInWater || !hitThroughBlocks.get()) }
private operator fun Unit.not(): Boolean {
return false
}private fun Boolean.get(): Boolean {
return this
}I didn't write this very well, and I only sent it after IntelliJ IDEA didn't report any errors. Of course, there may be bugs or spelling mistakes. Please don't just blindly copy and paste with Ctrl+c and Ctrl+v.(所有人向我看齐我宣布个事,我是*****)
-
Please stop posting random code here in the Forum. If you want to contribute to LiquidBounce Legacy, do it via Pull Request. Otherwise I am going to remove future posts from you.
-
@kawaiinekololis I understand, and I won't send garbled code in the future. Can you ensure that bugs will be fixed when I make a pull request? I will submit the modified KT file.
-
@kawaiinekololis I've read the manual, but I still don't understand how to make a pull request.
-
@kuntaihao if you want to add smth to legacy, you might aswell contribute to liquidbounce github and make pr there https://github.com/CCBlueX/LiquidBounce/pulls