Fixed deleting too many items
This commit is contained in:
parent
c21a499f82
commit
d900e6f639
|
|
@ -122,11 +122,11 @@ public class MineQuest extends Quest {
|
||||||
.forEach(itemStack -> {
|
.forEach(itemStack -> {
|
||||||
if (ref.tmpAmount == 0)
|
if (ref.tmpAmount == 0)
|
||||||
return;
|
return;
|
||||||
if (getAmount() > ref.tmpAmount) {
|
if (itemStack.getAmount() > ref.tmpAmount) {
|
||||||
itemStack.setAmount(getAmount() - ref.tmpAmount);
|
itemStack.setAmount(itemStack.getAmount() - ref.tmpAmount);
|
||||||
ref.tmpAmount = 0;
|
ref.tmpAmount = 0;
|
||||||
} else {
|
} else {
|
||||||
ref.tmpAmount -= getAmount();
|
ref.tmpAmount -= itemStack.getAmount();
|
||||||
itemStack.setAmount(0);
|
itemStack.setAmount(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user