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 -> {
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user