Skip to content

Commit

Permalink
blocking only procs when block action active
Browse files Browse the repository at this point in the history
Fixes #632
  • Loading branch information
Caltinor committed Jan 9, 2025
1 parent e4fa65a commit c20b821
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ShieldBlockHandler {

@SuppressWarnings("resource")
public static void handle(LivingShieldBlockEvent event) {
if (event.getEntity() instanceof Player player
if (event.getBlocked() && event.getEntity() instanceof Player player
&& event.getDamageSource().getEntity() instanceof Entity attacker) {

Core core = Core.get(player.level());
Expand Down

0 comments on commit c20b821

Please sign in to comment.