feat: new amount editing logic

- edit amount by scrolling will not remove the label
- now right click in recipe gui will remove the label
This commit is contained in:
Discreater committed 2021-05-08 04:15:47 +08:00
1 parent b6d5a7a9fe
commit 74e43cc883
10 files changed
+75 -38

No files matched your search

@@ -462,9 +462,11 @@ public interface ILabel {
@Override
public ILabel decreaseAmount() {
if (getAmount() <= getMultiplier())
if (getAmount() <= 0) {
return ILabel.EMPTY;
else {
} if (getAmount() <= getMultiplier()) {
return this;
} else {
return setAmount(getAmount() - getMultiplier());
}
}