Skip to content

Commit

Permalink
Respect cancelled drops when applying block luck (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
masmc05 authored Sep 29, 2024
1 parent e46fec9 commit a45ebaa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void onBreak(BlockBreakEvent event) {
Player player = event.getPlayer();
Block block = event.getBlock();

handleBreak(player, block, event, trait -> trait.getUniqueDrops(block, player));
handleBreak(player, block, event, trait -> event.isDropItems() ? trait.getUniqueDrops(block, player) : Collections.emptySet());
}

public void handleBreak(Player player, Block block, Cancellable event, Function<GatheringLuckTraits, Set<ItemStack>> dropFunction) {
Expand Down

0 comments on commit a45ebaa

Please sign in to comment.