Skip to content

Commit 873db39

Browse files
committed
- improved checkClientSideBreak stuff
1 parent 38a247c commit 873db39

File tree

1 file changed

+2
-5
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/player

1 file changed

+2
-5
lines changed

common/src/main/kotlin/com/lambda/module/modules/player/PacketMine.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,7 @@ object PacketMine : Module(
993993

994994
currentMiningBlock[block]?.apply {
995995
if (!isOutOfRange(pos.toCenterPos()) || packetReceiveBreak) {
996-
if (breakType.isPrimary() || packetReceiveBreak) {
997-
checkClientSideBreak(packetReceiveBreak, pos, doubleBreakBlock = doubleBreakBlock)
998-
}
996+
checkClientSideBreak(packetReceiveBreak, pos, doubleBreakBlock = doubleBreakBlock)
999997
}
1000998

1001999
if (timeCompleted == -1L) {
@@ -1063,12 +1061,11 @@ object PacketMine : Module(
10631061
)
10641062

10651063
private fun SafeContext.checkClientSideBreak(packetReceiveBreak: Boolean, pos: BlockPos, doubleBreakBlock: Boolean = false) {
1066-
if (packetReceiveBreak == validateBreak || doubleBreakBlock && packetReceiveBreak) {
1064+
if (packetReceiveBreak || (!validateBreak && !doubleBreakBlock)) {
10671065
interaction.breakBlock(pos)
10681066
}
10691067
}
10701068

1071-
//ToDo: Fix this shit
10721069
private fun shouldBePlacedInBlockQueue(pos: BlockPos): Boolean =
10731070
(((currentMiningBlock[0] != null && !doubleBreak) || currentMiningBlock[1] != null) || !blockQueue.isEmpty())
10741071
&& (currentMiningBlock[0]?.breakState != BreakState.ReBreaking || !blockQueue.isEmpty())

0 commit comments

Comments
 (0)