Merge pull request #104 from pavel-belous/1.7.10

math calculator: fix NumberFormatException
This commit is contained in:
Discreater authored and GitHub committed 2022-01-19 11:19:39 +08:00
commit 75ff72a320
1 file changed
+1 -1
@@ -69,7 +69,7 @@ public class RecordMath implements IRecord {
public RecordMath(NBTTagCompound nbt) {
state = State.values()[nbt.getInteger(KEY_STATE)];
operator = Operator.values()[nbt.getInteger(KEY_OPERATOR)];
last = nbt.hasKey(KEY_LAST) ? new BigDecimal(nbt.getString(KEY_LAST)) : BigDecimal.ZERO;
last = nbt.hasKey(KEY_LAST) ? BigDecimal.valueOf(nbt.getDouble(KEY_LAST)) : BigDecimal.ZERO;
current = nbt.getString(KEY_CURRENT);
}