File tree Expand file tree Collapse file tree 2 files changed +3
-146
lines changed
common/src/main/kotlin/com/lambda
interaction/construction/context Expand file tree Collapse file tree 2 files changed +3
-146
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import com.lambda.util.BlockUtils
2828import com.lambda.util.BlockUtils.blockState
2929import com.lambda.util.Communication.warn
3030import net.minecraft.block.BlockState
31+ import net.minecraft.util.ActionResult
3132import net.minecraft.util.Hand
3233import net.minecraft.util.hit.BlockHitResult
3334import net.minecraft.util.math.BlockPos
@@ -58,8 +59,8 @@ data class PlaceContext(
5859 player, hand, result
5960 )
6061
61- if (actionResult.isAccepted ) {
62- if (swingHand) {
62+ if (actionResult is ActionResult . Success ) {
63+ if (actionResult.swingSource() == ActionResult . SwingSource . CLIENT && swingHand) {
6364 player.swingHand(hand)
6465 }
6566
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments