Update PlayerListener
This commit is contained in:
parent
ec4329fcc1
commit
8c9ef4dfe4
1 changed files with 3 additions and 2 deletions
|
|
@ -37,8 +37,9 @@ public class PlayerListener implements Listener {
|
|||
// Cancel the original event to handle it ourselves
|
||||
event.setCancelled(true);
|
||||
|
||||
// Find connected crops (limit 32)
|
||||
List<Block> targets = Utils.findConnectedCrops(clickedBlock, 32);
|
||||
// Find connected crops (limit 32 or amount in hand)
|
||||
int maxToUse = Math.min(32, item.getAmount());
|
||||
List<Block> targets = Utils.findConnectedCrops(clickedBlock, maxToUse);
|
||||
if (targets.isEmpty()) return;
|
||||
|
||||
// Folia-safe execution on the region of the clicked block
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue