diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/AntiBot.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/AntiBot.kt index 31ff021aee..5e72ad1c27 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/AntiBot.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/client/AntiBot.kt @@ -11,10 +11,7 @@ import net.ccbluex.liquidbounce.features.module.Module import net.ccbluex.liquidbounce.utils.RotationUtils.angleDifference import net.ccbluex.liquidbounce.utils.RotationUtils.serverRotation import net.ccbluex.liquidbounce.utils.RotationUtils.toRotation -import net.ccbluex.liquidbounce.utils.extensions.center -import net.ccbluex.liquidbounce.utils.extensions.getFullName -import net.ccbluex.liquidbounce.utils.extensions.hitBox -import net.ccbluex.liquidbounce.utils.extensions.isMoving +import net.ccbluex.liquidbounce.utils.extensions.* import net.ccbluex.liquidbounce.utils.render.ColorUtils.stripColor import net.ccbluex.liquidbounce.value.* import net.minecraft.entity.EntityLivingBase @@ -115,7 +112,7 @@ object AntiBot : Module("AntiBot", Category.CLIENT, hideModule = false) { if (health && (entity.health > 20F || entity.health < 0F)) return true - if (entityID && (entity.entityId >= 1000000000 || entity.entityId <= -1)) + if (entityID && (entity.entityId >= 1000000000 || entity.entityId <= 0)) return true if (derp && (entity.rotationPitch > 90F || entity.rotationPitch < -90F)) @@ -135,10 +132,7 @@ object AntiBot : Module("AntiBot", Category.CLIENT, hideModule = false) { } if (ping) { - if (mc.netHandler.getPlayerInfo(entity.uniqueID)?.responseTime == 0 || - mc.netHandler.getPlayerInfo(entity.uniqueID)?.responseTime == null - ) - return true + if (entity.getPing() == 0) return true } if (invalidUUID && mc.netHandler.getPlayerInfo(entity.uniqueID) == null) { @@ -159,6 +153,12 @@ object AntiBot : Module("AntiBot", Category.CLIENT, hideModule = false) { if (invalidGround && invalidGroundList.getOrDefault(entity.entityId, 0) >= 10) return true + if (alwaysInRadius && entity.entityId !in notAlwaysInRadiusList) + return true + + if (alwaysBehind && entity.entityId in alwaysBehindList) + return true + if (duplicateProfile) { return mc.netHandler.playerInfoMap.count { it.gameProfile.name == entity.gameProfile.name @@ -213,12 +213,6 @@ object AntiBot : Module("AntiBot", Category.CLIENT, hideModule = false) { return !shouldReturn } - if (alwaysInRadius && entity.entityId !in notAlwaysInRadiusList) - return true - - if (alwaysBehind && entity.entityId in alwaysBehindList) - return true - return entity.name.isEmpty() || entity.name == mc.thePlayer.name } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt index 291b2b47b3..ce6cb41d73 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlow.kt @@ -10,8 +10,10 @@ import net.ccbluex.liquidbounce.features.module.Category import net.ccbluex.liquidbounce.features.module.Module import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura import net.ccbluex.liquidbounce.utils.BlinkUtils +import net.ccbluex.liquidbounce.utils.MovementUtils.hasMotion import net.ccbluex.liquidbounce.utils.PacketUtils.sendPacket import net.ccbluex.liquidbounce.utils.SilentHotbar +import net.ccbluex.liquidbounce.utils.chat import net.ccbluex.liquidbounce.utils.extensions.isMoving import net.ccbluex.liquidbounce.utils.inventory.InventoryUtils import net.ccbluex.liquidbounce.utils.timing.TickTimer @@ -97,13 +99,15 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM val heldItem = player.heldItem ?: return val isUsingItem = usingItemFunc() - if (mc.thePlayer.motionX == 0.0 && mc.thePlayer.motionZ == 0.0 && !shouldSwap) - return - - if (!consumeFoodOnly && heldItem.item is ItemFood || !consumeDrinkOnly && (heldItem.item is ItemPotion || heldItem.item is ItemBucketMilk)) + if (!hasMotion && !shouldSwap) return if (isUsingItem || shouldSwap) { + if (heldItem.item !is ItemSword && !consumeFoodOnly && heldItem.item is ItemFood || + !consumeDrinkOnly && (heldItem.item is ItemPotion || heldItem.item is ItemBucketMilk)) { + return + } + when (consumeMode.lowercase()) { "aac5" -> sendPacket(C08PacketPlayerBlockPlacement(BlockPos(-1, -1, -1), 255, heldItem, 0f, 0f, 0f)) @@ -134,8 +138,6 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM sendPacket(C07PacketPlayerDigging(RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.UP)) } } - - else -> return } } @@ -164,15 +166,11 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM } } } - - else -> return } } if (heldItem.item is ItemSword && isUsingItem) { when (swordMode.lowercase()) { - "none" -> return - "ncp" -> when (event.eventState) { EventState.PRE -> sendPacket( @@ -203,6 +201,7 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM "switchitem" -> if (event.eventState == EventState.PRE) { updateSlot() + chat("work") } "invalidc08" -> { @@ -226,9 +225,12 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM return // Credit: @ManInMyVan - // TODO: Not sure how to fix random grim simulation flag. + // TODO: Not sure how to fix random grim simulation flag. (Seem to only happen in Loyisa). if (consumeMode == "Drop") { - if (player.heldItem?.item !is ItemFood) return + if (player.heldItem?.item !is ItemFood) { + shouldNoSlow = false + return + } val isUsingItem = packet is C08PacketPlayerBlockPlacement && packet.placedBlockDirection == 255 @@ -321,11 +323,17 @@ object NoSlow : Module("NoSlow", Category.MOVEMENT, gameDetecting = false, hideM fun onSlowDown(event: SlowDownEvent) { val heldItem = mc.thePlayer.heldItem?.item - if (!consumeFoodOnly && heldItem is ItemFood || !consumeDrinkOnly && (heldItem is ItemPotion || heldItem is ItemBucketMilk)) - return + if (heldItem !is ItemSword) { + if (!consumeFoodOnly && heldItem is ItemFood || + !consumeDrinkOnly && (heldItem is ItemPotion || heldItem is ItemBucketMilk) + ) { + return + } + + if (consumeMode == "Drop" && !shouldNoSlow) + return + } - if (consumeMode == "Drop" && !shouldNoSlow && heldItem is ItemFood) - return event.forward = getMultiplier(heldItem, true) event.strafe = getMultiplier(heldItem, false) } diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/NameTags.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/NameTags.kt index 841cc29450..d2aa8319a2 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/NameTags.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/visual/NameTags.kt @@ -354,13 +354,11 @@ object NameTags : Module("NameTags", Category.VISUAL, hideModule = false) { if (armor && entity is EntityPlayer) { for (index in 0..4) { - if (entity.getEquipmentInSlot(index) == null) { - continue - } + val itemStack = entity.getEquipmentInSlot(index) ?: continue mc.renderItem.zLevel = -147F mc.renderItem.renderItemAndEffectIntoGUI( - entity.getEquipmentInSlot(index), -50 + index * 20, if (potion && foundPotion) -42 else -22 + itemStack, -50 + index * 20, if (potion && foundPotion) -42 else -22 ) } 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 5287059f2c..e3ead68336 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 @@ -16,6 +16,7 @@ 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.ui.font.AWTFontRenderer.Companion.assumeNonVolatile import net.ccbluex.liquidbounce.ui.font.Fonts import net.ccbluex.liquidbounce.utils.* import net.ccbluex.liquidbounce.utils.MovementUtils.speed @@ -260,6 +261,8 @@ class Text(x: Double = 10.0, y: Double = 10.0, scale: Float = 1F, side: Side = S val shouldRender = showBlock && stack != null && stack.item is ItemBlock val showBlockScale = if (shouldRender) 1.2F else 1F + assumeNonVolatile = true + if ((Scaffold.handleEvents() && onScaffold) || !onScaffold) { val rainbow = textColorMode == "Rainbow" val gradient = textColorMode == "Gradient" @@ -361,6 +364,8 @@ class Text(x: Double = 10.0, y: Double = 10.0, scale: Float = 1F, side: Side = S updateElement() } + assumeNonVolatile = false + return Border( ((-2F - if (shouldRender) 6F else 0F) * (1F + backgroundScale)) * (showBlockScale * 1.15F), (-2F * (1F + backgroundScale)) * showBlockScale,