@@ -271,9 +271,10 @@ object BreakManager : RequestHandler<BreakRequest>(
271271 info.context.cachedState.getOutlineShape(world, info.context.blockPos).boundingBoxes.map {
272272 it.offset(info.context.blockPos)
273273 }.forEach boxes@ { box ->
274- val dynamicAABB = DynamicAABB ()
275- val interpolated = interpolateBox(box, interpolatedProgress, info.breakConfig)
276- dynamicAABB.update(interpolated)
274+ val animationMode = info.breakConfig.animation
275+ val currentProgress = interpolateBox(box, currentProgress, animationMode)
276+ val nextProgress = interpolateBox(box, nextTicksProgress, animationMode)
277+ val dynamicAABB = DynamicAABB ().update(currentProgress).update(nextProgress)
277278 if (config.fill) render.filled(dynamicAABB, fillColor)
278279 if (config.outline) render.outline(dynamicAABB, outlineColor)
279280 }
@@ -883,9 +884,9 @@ object BreakManager : RequestHandler<BreakRequest>(
883884 return inRange && correctMaterial
884885 }
885886
886- private fun interpolateBox (box : Box , progress : Double , config : BreakConfig ): Box {
887+ private fun interpolateBox (box : Box , progress : Double , animationMode : BreakConfig . AnimationMode ): Box {
887888 val boxCenter = Box (box.center, box.center)
888- return when (config.animation ) {
889+ return when (animationMode ) {
889890 BreakConfig .AnimationMode .Out -> lerp(progress, boxCenter, box)
890891 BreakConfig .AnimationMode .In -> lerp(progress, box, boxCenter)
891892 BreakConfig .AnimationMode .InOut ->
0 commit comments