feat: almost done

This commit is contained in:
Discreater committed 2021-05-02 04:17:58 +08:00
1 parent 33b6ff5467
commit 3a5d094063
6 files changed
+117 -78

No files matched your search

@@ -451,8 +451,7 @@ public interface ILabel {
@Override
public ILabel increaseAmount() {
setAmount(getAmount() + getMultiplier());
return this;
return setAmount(getAmount() + getMultiplier());
}
@Override
@@ -460,8 +459,7 @@ public interface ILabel {
if (getAmount() <= getMultiplier())
return ILabel.EMPTY;
else {
setAmount(getAmount() - getMultiplier());
return this;
return setAmount(getAmount() - getMultiplier());
}
}
@@ -496,13 +494,10 @@ public interface ILabel {
@Override
public ILabel multiply(float i) {
float amount = i * getAmount();
if (amount > Long.MAX_VALUE)
throw new ArithmeticException("Multiply overflow");
setAmount((long) amount);
return this;
if (amount > Long.MAX_VALUE) throw new ArithmeticException("Multiply overflow");
return setAmount((long) amount);
}
@Override
@SideOnly(Side.CLIENT)
public void getToolTip(List<String> existing, boolean detailed) {