File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
common/src/main/kotlin/com/lambda/interaction/request/breaking Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,6 @@ import net.minecraft.entity.ItemEntity
5858import net.minecraft.sound.SoundCategory
5959import net.minecraft.util.Hand
6060import net.minecraft.util.math.BlockPos
61- import kotlin.math.abs
62- import kotlin.math.ceil
6361
6462object BreakManager : RequestHandler<BreakRequest>(
6563 0 ,
@@ -563,16 +561,7 @@ object BreakManager : RequestHandler<BreakRequest>(
563561 player,
564562 world,
565563 ctx.expectedPos
566- ).let { breakDelta ->
567- breakDelta * if (info.isSecondary || info.isRedundant) {
568- info.breakingTicks - config.fudgeFactor
569- } else {
570- val serverBreakTicks = ceil(1.0 / breakDelta).toInt()
571- val clientBreakTicks = ceil(config.breakThreshold / breakDelta).toInt()
572- val diff = serverBreakTicks - clientBreakTicks
573- info.breakingTicks - config.fudgeFactor.coerceAtMost(abs(diff))
574- }
575- }
564+ ) * (info.breakingTicks - config.fudgeFactor)
576565
577566 val overBreakThreshold = progress >= info.getBreakThreshold()
578567
You can’t perform that action at this time.
0 commit comments