Skip to content

Commit bf3fc35

Browse files
committed
priorities on all listeners in the break manager (unnecessary but clean for continuity)
1 parent f4311a7 commit bf3fc35

File tree

1 file changed

+4
-4
lines changed
  • common/src/main/kotlin/com/lambda/interaction/request/breaking

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ object BreakManager : RequestHandler<BreakRequest>(), PositionBlocking {
176176
postEvent()
177177
}
178178

179-
listen<UpdateManagerEvent.Rotation.Post>(priority = Int.MIN_VALUE) {
179+
listen<UpdateManagerEvent.Rotation.Post>(priority = Int.MIN_VALUE + 1) {
180180
validRotation = rotation?.done ?: true
181181
}
182182

183-
listen<WorldEvent.BlockUpdate.Server> { event ->
183+
listen<WorldEvent.BlockUpdate.Server>(priority = Int.MIN_VALUE + 1) { event ->
184184
pendingBreaks
185185
.firstOrNull { it.context.expectedPos == event.pos }
186186
?.let { pending ->
@@ -224,7 +224,7 @@ object BreakManager : RequestHandler<BreakRequest>(), PositionBlocking {
224224
}
225225

226226
// ToDo: Dependent on the tracked data order. When set stack is called after position it wont work
227-
listen<EntityEvent.EntityUpdate> {
227+
listen<EntityEvent.EntityUpdate>(priority = Int.MIN_VALUE + 1) {
228228
if (it.entity !is ItemEntity) return@listen
229229
pendingBreaks
230230
.firstOrNull { info -> matchesBlockItem(info, it.entity) }
@@ -242,7 +242,7 @@ object BreakManager : RequestHandler<BreakRequest>(), PositionBlocking {
242242
?.internalOnItemDrop(it.entity)
243243
}
244244

245-
listenUnsafe<ConnectionEvent.Connect.Pre> {
245+
listenUnsafe<ConnectionEvent.Connect.Pre>(priority = Int.MIN_VALUE + 1) {
246246
breakingInfos.forEach { it?.nullify() }
247247
pendingBreaks.clear()
248248
setBreakCooldown(0)

0 commit comments

Comments
 (0)