mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Fix ghost item when adding more than the required stack size
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
519c1cb937
commit
87819ba806
@ -31,7 +31,7 @@ public interface TransactionType {
|
|||||||
if (stackingRule.canBeStacked(itemStack, inventoryItem)) {
|
if (stackingRule.canBeStacked(itemStack, inventoryItem)) {
|
||||||
final int itemAmount = stackingRule.getAmount(inventoryItem);
|
final int itemAmount = stackingRule.getAmount(inventoryItem);
|
||||||
final int maxSize = stackingRule.getMaxSize(inventoryItem);
|
final int maxSize = stackingRule.getMaxSize(inventoryItem);
|
||||||
if (itemAmount == maxSize) continue;
|
if (itemAmount >= maxSize) continue;
|
||||||
if (!slotPredicate.test(i, inventoryItem)) {
|
if (!slotPredicate.test(i, inventoryItem)) {
|
||||||
// Cancelled transaction
|
// Cancelled transaction
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user