Fixed deleting too many items

This commit is contained in:
Teriuihi 2022-06-26 01:52:53 +02:00
parent c21a499f82
commit d900e6f639

View File

@ -122,11 +122,11 @@ public class MineQuest extends Quest {
.forEach(itemStack -> {
if (ref.tmpAmount == 0)
return;
if (getAmount() > ref.tmpAmount) {
itemStack.setAmount(getAmount() - ref.tmpAmount);
if (itemStack.getAmount() > ref.tmpAmount) {
itemStack.setAmount(itemStack.getAmount() - ref.tmpAmount);
ref.tmpAmount = 0;
} else {
ref.tmpAmount -= getAmount();
ref.tmpAmount -= itemStack.getAmount();
itemStack.setAmount(0);
}
});