Skip to content

Commit 880d66a

Browse files
committed
crash fix pt2
1 parent 080cf4a commit 880d66a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/src/main/java/com/lambda/mixin/entity/ClientPlayInteractionManagerMixin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public void interactItemHead(PlayerEntity player, Hand hand, CallbackInfoReturna
6868

6969
@Inject(method = "attackBlock", at = @At("HEAD"), cancellable = true)
7070
public void onAttackBlock(BlockPos pos, Direction side, CallbackInfoReturnable<Boolean> cir) {
71-
if (EventFlow.post(new PlayerEvent.Attack.Block(pos, side)).isCanceled()) cir.cancel();
71+
if (EventFlow.post(new PlayerEvent.Attack.Block(pos, side)).isCanceled()) {
72+
cir.setReturnValue(false);
73+
}
7274
}
7375

7476
@Inject(method = "attackEntity", at = @At("HEAD"), cancellable = true)

0 commit comments

Comments
 (0)