File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
common/src/main/kotlin/com/lambda/interaction/construction/context Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ import com.lambda.interaction.construction.verify.TargetState
2525import com.lambda.interaction.request.rotation.RotationRequest
2626import com.lambda.util.world.raycast.RayCastUtils.distanceTo
2727import net.minecraft.block.BlockState
28+ import net.minecraft.block.Blocks
29+ import net.minecraft.block.FallingBlock
2830import net.minecraft.client.network.ClientPlayerInteractionManager
2931import net.minecraft.client.world.ClientWorld
3032import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket
@@ -56,14 +58,16 @@ data class BreakContext(
5658
5759 fun exposedSides (ctx : SafeContext ) =
5860 Direction .entries.filter {
59- ctx.world.isAir(result.blockPos .offset(it))
61+ ctx.world.isAir(expectedPos .offset(it))
6062 }
6163
6264 override val expectedState: BlockState = checkedState.fluidState.blockState
6365
6466 override fun compareTo (other : BuildContext ): Int {
6567 return when (other) {
66- is BreakContext -> compareBy<BreakContext > {
68+ is BreakContext -> compareByDescending<BreakContext > {
69+ if (it.checkedState.block is FallingBlock ) it.expectedPos.y else 0
70+ }.thenBy {
6771 it.rotation.target.angleDistance
6872 }.compare(this , other)
6973
You can’t perform that action at this time.
0 commit comments