- Updated to work with Minecraft 1.21.6.
- Added more chat messages for actions like adding/removing functions, constants, etc.
- Added a new dependency,
fabric-api
. Pretty much every mod uses it, you probably have it installed already. - Added another new dependency
rimelib
, and it's embedded in the mod for now. It's still under review on modrinth, but it's a library mod I've made that provides some utility functions for fabric mods. This is where the new config's backend lies, and chatcalc just implements a class for it. - Revamped config system (mostly backend changes):
The config is now strongly typed with a config class, and there's a new config handler that handles all the config operations.
Previously, config was handled with a raw JsonObject
, and the encoding was done manually with string concatenation magic.
This made it very hard to add a gui for the config or handle the config in a type-safe way, and there were a lot of checks for each config value to make sure it was valid.
Now, the config is handled with a Config
class that has all the config values as properties, and the encoding is done with a codec.
This makes things much easier to handle, and it also allows for a gui to be added in the future. I'm planning on using YACL for the gui, but that's for another time.
The config format was also changed, and the codec should be able to decode both formats while only encoding the new one. However, I was unable to get a config file in the old format to test this, so please report any issues you encounter.
Fixed an issue where tan(90°) wouldn't return infinity (by 70CentsApple)
New Features
- Added support for binary, octal and hexadecimal numbers (Closes Issue #1)
- Added calculations on signs. Might as well take the
chat
out ofchatcalc
.
Fixes
- Trying to fill in the result of an equation will no longer delete the
=
character. - Moving the cursor between the last and second last character of a calculation will no longer ignore the last character. (For example, when the cursor was between
3
and0
in5*30
, the calculation would result5*3=15
rather than5*30=150
.) - The links this mod provides to other things should now point to the correct pages. Also added the missing few links such as issues and mod homepage. (Example: the
Source
link in ModMenu was pointing to the upstream repository rather than this fork's.)