Skip to content

Commit b4fb18a

Browse files
committed
lot type and state when starting and breaking block
1 parent f35adad commit b4fb18a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ object BreakManager : RequestHandler<BreakRequest>(
745745
ctx.blockPos,
746746
config
747747
) * (info.breakingTicks - config.fudgeFactor)
748-
logger.debug("${info.type} progress: $progress, breaking ticks: ${info.breakingTicks}")
748+
logger.debug("${info.type} progress: $progress, breaking ticks: ${info.breakingTicks}, ${info.context.cachedState}")
749749

750750
if (config.sounds) {
751751
if (info.soundsCooldown % 4.0f == 0.0f) {
@@ -774,7 +774,7 @@ object BreakManager : RequestHandler<BreakRequest>(
774774

775775
val swing = config.swing
776776
if (progress >= info.getBreakThreshold() && info.swapInfo.canCompleteBreak) {
777-
logger.success("Breaking ${info.type}")
777+
logger.success("Breaking ${info.type} ${info.context.cachedState}")
778778
if (info.type == Primary) {
779779
onBlockBreak(info)
780780
info.stopBreakPacket(world, interaction)
@@ -804,7 +804,7 @@ object BreakManager : RequestHandler<BreakRequest>(
804804
logger.debug("Handling potential rebreak")
805805
when (val rebreakResult = RebreakHandler.handleUpdate(info.context, info.request)) {
806806
is RebreakResult.StillBreaking -> {
807-
logger.debug("Rebreak not complete")
807+
logger.debug("Rebreak not complete ${info.context.cachedState}")
808808
primaryBreak = rebreakResult.breakInfo.apply {
809809
type = Primary
810810
RebreakHandler.clearRebreak()
@@ -818,7 +818,7 @@ object BreakManager : RequestHandler<BreakRequest>(
818818
return true
819819
}
820820
is RebreakResult.Rebroke -> {
821-
logger.debug("Rebroke")
821+
logger.debug("Rebroke ${info.context.cachedState}")
822822
info.type = Rebreak
823823
info.nullify()
824824
info.request.onReBreak?.invoke(ctx.blockPos)
@@ -852,11 +852,11 @@ object BreakManager : RequestHandler<BreakRequest>(
852852
val progress = blockState.calcBreakDelta(player, world, ctx.blockPos, info.breakConfig)
853853
info.vanillaInstantBreakable = progress >= 1 && info.swapInfo.canCompleteBreak
854854
if (progress >= info.getBreakThreshold() && info.swapInfo.canCompleteBreak) {
855-
logger.success("Instantly breaking")
855+
logger.success("Instantly breaking ${info.type} $blockState")
856856
onBlockBreak(info)
857857
if (!info.vanillaInstantBreakable) breakCooldown = info.breakConfig.breakDelay
858858
} else {
859-
logger.debug("Starting ${info.type}")
859+
logger.debug("Starting ${info.type} $blockState")
860860
info.apply {
861861
breaking = true
862862
breakingTicks = 1

0 commit comments

Comments
 (0)