Fix ghost item when adding more than the required stack size

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-11-08 09:01:48 +01:00
parent 519c1cb937
commit 87819ba806

View File

@ -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;