Fix compilation error in AmountSpecifyingScreen due to cherry picking

This commit is contained in:
raoulvdberge
2022-01-25 17:55:53 +01:00
parent 75b24c1cc5
commit e3a5fb7049

View File

@@ -67,13 +67,13 @@ public abstract class AmountSpecifyingScreen<T extends AbstractContainerMenu> ex
amountField.setResponder(text -> {
int amount = 0;
try {
amount = Integer.parseInt(amountField.getText());
amount = Integer.parseInt(amountField.getValue());
} catch (NumberFormatException e) {
// NO OP
}
if (amount > getMaxAmount()) {
amountField.setText(String.valueOf(getMaxAmount()));
amountField.setValue(String.valueOf(getMaxAmount()));
}
});