Skip to content

Commit f3c1b32

Browse files
committed
remove abort at start of packet mine
1 parent ff95112 commit f3c1b32

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

common/src/main/kotlin/com/lambda/interaction/request/breaking/BreakManager.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,10 @@ object BreakManager : RequestHandler<BreakRequest>() {
241241
}
242242

243243
if (ctx.buildConfig.breakSettings.breakMode == BreakMode.Packet) {
244-
ctx.abortBreakPacket(sequence, connection)
244+
ctx.stopBreakPacket(sequence, connection)
245+
ctx.startBreakPacket(sequence + 1, connection)
245246
ctx.stopBreakPacket(sequence + 1, connection)
246-
ctx.startBreakPacket(sequence + 2, connection)
247-
ctx.stopBreakPacket(sequence + 3, connection)
248-
repeat(3) {
247+
repeat(2) {
249248
pendingUpdateManager.incrementSequence()
250249
}
251250
} else {

common/src/main/kotlin/com/lambda/module/modules/player/PacketMineRewrite.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,15 @@ object PacketMineRewrite : Module(
4141

4242
init {
4343
listen<PlayerEvent.Attack.Block> {
44-
blueprint = setOf(player.blockPos.add(1, 0, 0), player.blockPos.add(1, 1, 0)).associateWith { TargetState.Air }.toBlueprint()
44+
it.cancel()
45+
blueprint = setOf(
46+
player.blockPos.add(1, 0, 0),
47+
player.blockPos.add(1, 1, 0),
48+
player.blockPos.add(1, 0, 1),
49+
player.blockPos.add(1, 1, 1),
50+
player.blockPos.add(1, 0, -1),
51+
player.blockPos.add(1, 1, -1),
52+
).associateWith { TargetState.Air }.toBlueprint()
4553
task?.cancel()
4654

4755
task = blueprint?.build(build = buildConfig)?.run()

0 commit comments

Comments
 (0)