@@ -19,6 +19,9 @@ package com.lambda.interaction.request.breaking
1919
2020import com.lambda.interaction.construction.context.BreakContext
2121import com.lambda.interaction.request.ActionInfo
22+ import com.lambda.interaction.request.DebugLogger.LogEntry.Companion.toLogContext
23+ import com.lambda.interaction.request.LogContext
24+ import com.lambda.interaction.request.LogContext.Companion.buildLogContext
2225import com.lambda.interaction.request.breaking.BreakInfo.BreakType.Primary
2326import com.lambda.interaction.request.breaking.BreakInfo.BreakType.Rebreak
2427import com.lambda.interaction.request.breaking.BreakInfo.BreakType.RedundantSecondary
@@ -39,7 +42,7 @@ data class BreakInfo(
3942 override var context : BreakContext ,
4043 var type : BreakType ,
4144 var request : BreakRequest
42- ) : ActionInfo {
45+ ) : ActionInfo, LogContext {
4346 // Delegates
4447 val breakConfig get() = request.build.breaking
4548 override val pendingInteractionsList get() = request.pendingInteractions
@@ -148,5 +151,28 @@ data class BreakInfo(
148151 )
149152 }
150153
154+ override fun toLogContext () =
155+ buildLogContext {
156+ text(" Break Info:" )
157+ pushTab()
158+ text(" Type: $type " )
159+ text(" Pos: ${context.blockPos.toLogContext()} " )
160+ text(" Details:" )
161+ pushTab()
162+ text(" Should Progress: $shouldProgress " )
163+ text(" Rebreak Potential: $rebreakPotential " )
164+ text(swapInfo.toLogContext())
165+ text(" Swap Stack: $swapStack " )
166+ text(" Updated This Tick: $updatedThisTick " )
167+ text(" Updated Pre-Processing This Tick: $updatedPreProcessingThisTick " )
168+ text(" Progressed This Tick: $progressedThisTick " )
169+ text(" Breaking: $breaking " )
170+ text(" Abandoned: $abandoned " )
171+ text(" Breaking Ticks: $breakingTicks " )
172+ text(" Sounds Cooldown: $soundsCooldown " )
173+ text(" Vanilla Instant Breakable: $vanillaInstantBreakable " )
174+ text(" Rebreakable: $rebreakable " )
175+ }
176+
151177 override fun toString () = " $type , ${context.cachedState} , ${context.blockPos} "
152178}
0 commit comments