Skip to content

Commit 747d7b9

Browse files
committed
更新
更新一些Png & 删除无用的功能 & 更新一点Grim绕过
1 parent edbfdfc commit 747d7b9

File tree

31 files changed

+202
-132
lines changed

31 files changed

+202
-132
lines changed

src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/Velocity.kt

-74
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class Velocity : Module() {
3939
private val verticalValue = FloatValue("Vertical", 0F, -1F, 1F)
4040
private val velocityTickValue = IntegerValue("VelocityTick", 1, 0, 10).displayable { modeValue.equals("Tick") || modeValue.equals("OldSpartan")}
4141
private val modeValue = ListValue("Mode", arrayOf("Simple", "Tick", "Vanilla", "AACPush", "AACZero", "AAC4Reduce", "AAC5Reduce",
42-
"Redesky1", "Redesky2",
4342
"AAC5.2.0", "AAC5.2.0Combat",
4443
"MatrixReduce", "MatrixSimple", "MatrixReverse",
4544
"Reverse", "SmoothReverse",
@@ -65,10 +64,6 @@ class Velocity : Module() {
6564
private val legitStrafeValue = BoolValue("LegitStrafe", false).displayable { modeValue.equals("Legit") }
6665
private val legitFaceValue = BoolValue("LegitFace", true).displayable { modeValue.equals("Legit") }
6766

68-
private val rspAlwaysValue = BoolValue("RedeskyAlwaysReduce", true)
69-
.displayable { modeValue.contains("RedeSky") }
70-
private val rspDengerValue = BoolValue("RedeskyOnlyDanger", false)
71-
.displayable { modeValue.contains("RedeSky") }
7267

7368
private val onlyGroundValue = BoolValue("OnlyGround", false)
7469
private val onlyCombatValue = BoolValue("OnlyCombat", false)
@@ -441,75 +436,6 @@ class Velocity : Module() {
441436
"legit" -> {
442437
pos = BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)
443438
}
444-
445-
"redesky2" -> {
446-
if (packet.getMotionX() == 0 && packet.getMotionZ() == 0) { // ignore horizonal velocity
447-
return
448-
}
449-
450-
val target = LiquidBounce.combatManager.getNearByEntity(LiquidBounce.moduleManager[KillAura::class.java]!!.rangeValue.get() + 1) ?: return
451-
mc.thePlayer.motionX = 0.0
452-
mc.thePlayer.motionZ = 0.0
453-
packet.motionX = 0
454-
packet.motionZ = 0
455-
for (i in 0..redeCount) {
456-
mc.thePlayer.sendQueue.addToSendQueue(C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK))
457-
mc.thePlayer.sendQueue.addToSendQueue(C0APacketAnimation())
458-
}
459-
if (redeCount> 12) redeCount -= 5
460-
}
461-
462-
"redesky1" -> {
463-
if (packet.getMotionX() == 0 && packet.getMotionZ() == 0) { // ignore horizonal velocity
464-
return
465-
}
466-
467-
if (rspDengerValue.get()) {
468-
val pos = FallingPlayer(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, packet.motionX / 8000.0, packet.motionY / 8000.0, packet.motionZ / 8000.0, 0f, 0f, 0f, 0f).findCollision(60)
469-
if (pos != null && pos.y> (mc.thePlayer.posY - 7)) {
470-
return
471-
}
472-
}
473-
474-
val target = LiquidBounce.combatManager.getNearByEntity(LiquidBounce.moduleManager[KillAura::class.java]!!.rangeValue.get()) ?: return
475-
if (rspAlwaysValue.get()) {
476-
mc.thePlayer.motionX = 0.0
477-
mc.thePlayer.motionZ = 0.0
478-
// mc.thePlayer.motionY=(packet.motionY/8000f)*1.0
479-
packet.motionX = 0
480-
packet.motionZ = 0
481-
// event.cancelEvent() better stuff
482-
}
483-
484-
if (velocityCalcTimer.hasTimePassed(500)) {
485-
if (!rspAlwaysValue.get()) {
486-
mc.thePlayer.motionX = 0.0
487-
mc.thePlayer.motionZ = 0.0
488-
// mc.thePlayer.motionY=(packet.motionY/8000f)*1.0
489-
packet.motionX = 0
490-
packet.motionZ = 0
491-
}
492-
val count = if (!velocityCalcTimer.hasTimePassed(800)) {
493-
8
494-
} else if (!velocityCalcTimer.hasTimePassed(1200)) {
495-
12
496-
} else {
497-
25
498-
}
499-
for (i in 0..count) {
500-
mc.thePlayer.sendQueue.addToSendQueue(C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK))
501-
mc.thePlayer.sendQueue.addToSendQueue(C0APacketAnimation())
502-
}
503-
velocityCalcTimer.reset()
504-
} else {
505-
packet.motionX = (packet.motionX * 0.6).toInt()
506-
packet.motionZ = (packet.motionZ * 0.6).toInt()
507-
for (i in 0..4) {
508-
mc.thePlayer.sendQueue.addToSendQueue(C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK))
509-
mc.thePlayer.sendQueue.addToSendQueue(C0APacketAnimation())
510-
}
511-
}
512-
}
513439
}
514440
}
515441
}

src/main/java/net/ccbluex/liquidbounce/features/module/modules/movement/NoSlowDown.kt

+193-30
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,217 @@ import net.ccbluex.liquidbounce.features.module.Module
66
import net.ccbluex.liquidbounce.features.module.ModuleCategory
77
import net.ccbluex.liquidbounce.features.module.ModuleInfo
88
import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura
9-
import net.ccbluex.liquidbounce.utils.ClientUtils
10-
import net.ccbluex.liquidbounce.utils.MovementUtils
9+
import net.ccbluex.liquidbounce.features.module.modules.exploit.Disabler
1110
import net.ccbluex.liquidbounce.utils.PacketUtils
12-
import net.ccbluex.liquidbounce.utils.timer.MSTimer
1311
import net.ccbluex.liquidbounce.value.BoolValue
14-
import net.ccbluex.liquidbounce.value.FloatValue
15-
import net.ccbluex.liquidbounce.value.IntegerValue
16-
import net.ccbluex.liquidbounce.value.ListValue
17-
import net.minecraft.item.*
12+
import net.minecraft.client.Minecraft
13+
import net.minecraft.client.gui.GuiDownloadTerrain
14+
import net.minecraft.item.ItemSword
15+
import net.minecraft.network.INetHandler
1816
import net.minecraft.network.Packet
19-
import net.minecraft.network.play.INetHandlerPlayServer
20-
import net.minecraft.network.play.client.*
21-
import net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook
17+
import net.minecraft.network.login.server.S01PacketEncryptionRequest
18+
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement
19+
import net.minecraft.network.play.client.C09PacketHeldItemChange
20+
import net.minecraft.network.play.client.C0FPacketConfirmTransaction
21+
import net.minecraft.network.play.server.S00PacketKeepAlive
22+
import net.minecraft.network.play.server.S01PacketJoinGame
23+
import net.minecraft.network.play.server.S02PacketChat
24+
import net.minecraft.network.play.server.S03PacketTimeUpdate
25+
import net.minecraft.network.play.server.S04PacketEntityEquipment
26+
import net.minecraft.network.play.server.S06PacketUpdateHealth
2227
import net.minecraft.network.play.server.S08PacketPlayerPosLook
23-
import net.minecraft.util.BlockPos
24-
import net.minecraft.util.EnumFacing
25-
import java.util.*
26-
import kotlin.math.sqrt
28+
import net.minecraft.network.play.server.S0FPacketSpawnMob
29+
import net.minecraft.network.play.server.S12PacketEntityVelocity
30+
import net.minecraft.network.play.server.S13PacketDestroyEntities
31+
import net.minecraft.network.play.server.S18PacketEntityTeleport
32+
import net.minecraft.network.play.server.S19PacketEntityHeadLook
33+
import net.minecraft.network.play.server.S19PacketEntityStatus
34+
import net.minecraft.network.play.server.S1CPacketEntityMetadata
35+
import net.minecraft.network.play.server.S20PacketEntityProperties
36+
import net.minecraft.network.play.server.S21PacketChunkData
37+
import net.minecraft.network.play.server.S22PacketMultiBlockChange
38+
import net.minecraft.network.play.server.S23PacketBlockChange
39+
import net.minecraft.network.play.server.S27PacketExplosion
40+
import net.minecraft.network.play.server.S2FPacketSetSlot
41+
import net.minecraft.network.play.server.S32PacketConfirmTransaction
42+
import net.minecraft.network.play.server.S35PacketUpdateTileEntity
43+
import net.minecraft.network.play.server.S38PacketPlayerListItem
44+
import net.minecraft.network.play.server.S3EPacketTeams
45+
import net.minecraft.network.play.server.S3FPacketCustomPayload
46+
import net.minecraft.network.play.server.S40PacketDisconnect
47+
import net.minecraft.network.play.server.S44PacketWorldBorder
48+
import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter
49+
import net.minecraft.network.status.server.S00PacketServerInfo
50+
import net.minecraft.network.status.server.S01PacketPong
51+
import java.util.concurrent.ConcurrentLinkedDeque
52+
import java.util.concurrent.CopyOnWriteArrayList
2753

28-
@ModuleInfo(name = "NoSlowDwon", category = ModuleCategory.MOVEMENT)
54+
@ModuleInfo(name = "NoSlowDown", category = ModuleCategory.MOVEMENT)
2955
class NoSlowDown : Module() {
3056

57+
var lastSprinting = false
58+
var lastSlot = 0
59+
private var lastResult = false
60+
var storedPackets: MutableList<Packet<INetHandler>> = CopyOnWriteArrayList()
61+
var pingPackets: ConcurrentLinkedDeque<Int> = ConcurrentLinkedDeque()
62+
63+
val post = BoolValue("Post",true)
64+
65+
fun hasSword(): Boolean {
66+
return Minecraft.getMinecraft().thePlayer.inventory.currentItem != null && (Minecraft.getMinecraft().thePlayer.heldItem.item is ItemSword)
67+
}
68+
3169
@EventTarget
3270
fun onMotion(event: MotionEvent) {
3371
if ((mc.thePlayer.isBlocking || LiquidBounce.moduleManager[KillAura::class.java]!!.blockingStatus) && mc.thePlayer.heldItem.item is ItemSword) {
3472
if (event.eventState == EventState.PRE) {
35-
PacketUtils.sendPacketNoEvent(
36-
C07PacketPlayerDigging(
37-
C07PacketPlayerDigging.Action.RELEASE_USE_ITEM,
38-
BlockPos.ORIGIN,
39-
EnumFacing.DOWN
40-
)
41-
)
73+
mc.netHandler.addToSendQueue(C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 8 + 1));
74+
mc.netHandler.addToSendQueue(C0FPacketConfirmTransaction(Int.MAX_VALUE, 32767.toShort(), true))
75+
mc.netHandler.addToSendQueue(C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
4276
}
4377
if (event.eventState == EventState.POST) {
44-
PacketUtils.sendPacketNoEvent(C0FPacketConfirmTransaction());
45-
mc.netHandler.addToSendQueue(C08PacketPlayerBlockPlacement(mc.thePlayer.heldItem))
78+
mc.netHandler.addToSendQueue(C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()))
4679
}
4780
}
4881
}
82+
4983
@EventTarget
5084
fun onSlowDown(event: SlowDownEvent) {
51-
if(mc.thePlayer == null || mc.theWorld == null)
52-
return
85+
if (hasSword()) {
86+
if(mc.thePlayer == null || mc.theWorld == null)
87+
return
5388

54-
if ((mc.thePlayer.isBlocking || LiquidBounce.moduleManager[KillAura::class.java]!!.blockingStatus) && mc.thePlayer.heldItem.item is ItemSword) {
55-
event.forward = 1.0F
56-
event.strafe = 1.0F
89+
if ((mc.thePlayer.isBlocking || LiquidBounce.moduleManager[KillAura::class.java]!!.blockingStatus) && mc.thePlayer.heldItem.item is ItemSword) {
90+
event.forward = 1.0F
91+
event.strafe = 1.0F
92+
}
93+
}
94+
95+
@EventTarget
96+
fun onWorld(event: WorldEvent) {
97+
this.lastSlot = -1
98+
this.lastSprinting = false
99+
}
100+
}
101+
102+
fun getGrimPost(): Boolean {
103+
val disabler = LiquidBounce.moduleManager.getModule(Disabler::class.java) as Disabler
104+
val result = disabler.state && post.get()
105+
&& mc.thePlayer != null
106+
&& mc.thePlayer!!.isEntityAlive
107+
&& mc.thePlayer!!.ticksExisted >= 10
108+
&& mc.currentScreen !is GuiDownloadTerrain
109+
110+
if (lastResult && !result) {
111+
lastResult = false
112+
mc.addScheduledTask { processPackets() }
113+
}
114+
return result.also { lastResult = it }
115+
}
116+
fun processPackets() {
117+
if (storedPackets.isNotEmpty()) {
118+
for (packet in storedPackets) {
119+
val event = PacketEvent(packet, PacketEvent.Type.RECEIVE)
120+
LiquidBounce.eventManager.callEvent(event)
121+
if (event.isCancelled) {
122+
continue
123+
}
124+
packet.processPacket(mc.netHandler)
125+
}
126+
storedPackets.clear()
127+
}
128+
}
129+
130+
fun grimPostDelay(packet: Packet<*>): Boolean {
131+
if (mc.thePlayer == null) {
132+
return false
133+
}
134+
if (mc.currentScreen is GuiDownloadTerrain) {
135+
return false
136+
}
137+
if (packet is S00PacketServerInfo) {
138+
return false
139+
}
140+
if (packet is S01PacketEncryptionRequest) {
141+
return false
142+
}
143+
if (packet is S38PacketPlayerListItem) {
144+
return false
145+
}
146+
if (packet is S40PacketDisconnect) {
147+
return false
148+
}
149+
if (packet is S21PacketChunkData) {
150+
return false
151+
}
152+
if (packet is S01PacketPong) {
153+
return false
154+
}
155+
if (packet is S44PacketWorldBorder) {
156+
return false
157+
}
158+
if (packet is S01PacketJoinGame) {
159+
return false
160+
}
161+
if (packet is S19PacketEntityHeadLook) {
162+
return false
163+
}
164+
if (packet is S3EPacketTeams) {
165+
return false
166+
}
167+
if (packet is S02PacketChat) {
168+
return false
169+
}
170+
if (packet is S2FPacketSetSlot) {
171+
return false
172+
}
173+
if (packet is S1CPacketEntityMetadata) {
174+
return false
175+
}
176+
if (packet is S20PacketEntityProperties) {
177+
return false
178+
}
179+
if (packet is S35PacketUpdateTileEntity) {
180+
return false
181+
}
182+
if (packet is S03PacketTimeUpdate) {
183+
return false
184+
}
185+
if (packet is S47PacketPlayerListHeaderFooter) {
186+
return false
187+
}
188+
if (packet is S12PacketEntityVelocity) {
189+
val sPacketEntityVelocity: S12PacketEntityVelocity = packet
190+
return sPacketEntityVelocity.entityID == mc.thePlayer!!.entityId
191+
}
192+
return packet is S27PacketExplosion
193+
|| packet is S32PacketConfirmTransaction
194+
|| packet is S08PacketPlayerPosLook
195+
|| packet is S18PacketEntityTeleport
196+
|| packet is S19PacketEntityStatus
197+
|| packet is S04PacketEntityEquipment
198+
|| packet is S23PacketBlockChange
199+
|| packet is S22PacketMultiBlockChange
200+
|| packet is S13PacketDestroyEntities
201+
|| packet is S00PacketKeepAlive
202+
|| packet is S06PacketUpdateHealth
203+
|| packet is S18PacketEntityTeleport
204+
|| packet is S0FPacketSpawnMob
205+
|| packet is S3FPacketCustomPayload
206+
}
207+
fun fixC0F(packet: C0FPacketConfirmTransaction) {
208+
val id: Int = packet.uid.toInt()
209+
if (id >= 0 || pingPackets.isEmpty()) {
210+
PacketUtils.sendPacketNoEvent(packet)
211+
} else {
212+
do {
213+
val current: Int = pingPackets.first
214+
PacketUtils.sendPacketNoEvent(C0FPacketConfirmTransaction(packet.windowId, current.toShort(), true))
215+
pingPackets.pollFirst()
216+
if (current == id) {
217+
break
218+
}
219+
} while (!pingPackets.isEmpty())
57220
}
58221
}
59-
}
222+
}

0 commit comments

Comments
 (0)