mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-07 08:58:20 +01:00
Fix drag click
This commit is contained in:
parent
0fea9b39a2
commit
2531161964
@ -289,12 +289,12 @@ public class InventoryClickProcessor {
|
||||
|
||||
final int maxSize = stackingRule.getMaxSize();
|
||||
if (stackingRule.canBeStacked(cursor, slotItem)) {
|
||||
final int amount = slotItemRule.getAmount(slotItem) + slotSize;
|
||||
if (stackingRule.canApply(slotItem, amount)) {
|
||||
slotItem = stackingRule.apply(slotItem, amount);
|
||||
final int amount = slotItemRule.getAmount(slotItem);
|
||||
if (stackingRule.canApply(slotItem, amount + slotSize)) {
|
||||
slotItem = stackingRule.apply(slotItem, a -> a + slotSize);
|
||||
finalCursorAmount -= slotSize;
|
||||
} else {
|
||||
final int removedAmount = amount - maxSize;
|
||||
final int removedAmount = maxSize - amount;
|
||||
slotItem = stackingRule.apply(slotItem, maxSize);
|
||||
finalCursorAmount -= removedAmount;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user