Skip to content

Commit ed69d46

Browse files
committed
change start packet for packet modes
1 parent 3253006 commit ed69d46

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

common/src/main/kotlin/com/lambda/config/groups/BuildConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface BuildConfig {
4949
val placementsPerTick: Int
5050

5151
enum class BreakMode {
52-
Vanilla, Packets
52+
Vanilla, Packet
5353
}
5454

5555
enum class BreakConfirmationMode {

common/src/main/kotlin/com/lambda/task/tasks/BuildTask.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,16 @@ class BuildTask @Ta5kBuilder constructor(
451451
}
452452
}
453453

454-
ctx.abortBreakPacket(sequence, connection)
455-
ctx.stopBreakPacket(sequence + 1, connection)
456-
ctx.startBreakPacket(sequence + 2, connection)
457-
ctx.stopBreakPacket(sequence + 3, connection)
458-
(0..3).forEach { i ->
459-
pendingUpdateManager.incrementSequence()
454+
if (ctx.buildConfig.breakMode == BuildConfig.BreakMode.Packet) {
455+
ctx.abortBreakPacket(sequence, connection)
456+
ctx.stopBreakPacket(sequence + 1, connection)
457+
ctx.startBreakPacket(sequence + 2, connection)
458+
ctx.stopBreakPacket(sequence + 3, connection)
459+
(0..3).forEach { i ->
460+
pendingUpdateManager.incrementSequence()
461+
}
462+
} else {
463+
ctx.startBreakPacket(sequence, connection)
460464
}
461465

462466
return true

0 commit comments

Comments
 (0)