js802025 / calcmod

Calculator Mod
MIT License
13 stars 4 forks source link

CalcMod Logo github modrinth curseforge

Bring the power of calculation to your Minecraft chat with CalcMod! Whether you're a casual or technical player, enjoy features from basic calculations to advanced tools for optimizing gameplay.


/calc craft piston 3 sb
Craft Command Example
/calc nether ~ ~ ~
X: -120 Z: 4500 to Nether = X: -15 Z: 563

Click any green text to copy it to your clipboard!

๐Ÿ”„ Compatibility

CalcMod supports Fabric, Forge, and Quilt mod loaders, down to Minecraft version 1.12.

CalcMod can be installed on both the client and server, and also works on clients without requiring servers to have the mod (and vice versa.)

โœ… Features:

See a few examples in gallery

๐ŸŸข Basic Calculator Functions like a simple calculator with some handy variables. To see a list of variables run /calc variables. >Usage: ```/calc ```
Supported Operators | **Symbol(s)** | **Syntax** | **Operation** | |:-------------:|:----------:|:----------------------:| | + | a+b | Addition | | โ€“ | aโ€“b | Subtraction | | * , ร— , โˆ™ | a*b | Multiplication | | / , : , รท | a/b | Division | | ^ | a^b | Exponentiation (power) | | ! | n! | Factorial | | # | a#b | Modulo | | % | n% | Percentage | | ^^ | a^^b | Tetration | | โˆš | โˆšx | Square root | | โˆ› | โˆ›x | Cube root | | โˆœ | โˆœx | Fourth root |
> CalcMod has even more advanced functions and variables for Minecraft, located in a spreadsheet [here](https://docs.google.com/spreadsheets/d/1L3jCFO6ZiUymXbRJKOJIWGpcOQjfvU3TpCcFPeUJDNA/edit?usp=sharing).
๐Ÿ“ฆ Storage Utils Calculates the number of needed item sorters given a rate of items per hour *(can be in expression form)*. Additional input for multiple times hopper speed sorters, and a separate command for Allay based non stackable sorters. >Usage: ```/calc storage ``` >Usage: ```/calc storage ``` >Usage: ```/calc allaystorage ```
๐Ÿ› ๏ธ Crafting Utils Given a desired item and the quantity to be crafted, returns the amounts of the items needed to craft the amount of the desired item. **(1.3.2+)** Depth is an optional argument that specifies how many levels of recursive crafting to perform on the recipe. Default depth is 1. >Usage: ```/calc craft ``` >Usage: ```/calc craft ```
๐ŸŒ Portal Linking Coords Given a block position returns the other dimension's corresponding coordinates. If no coordinates are given, command assumes current player position. >Usage: ```/calc nether ``` >Usage: ```/calc overworld ```
๐ŸŒพ Farm Rates Calculator Given a number of items and afk time in seconds *(can be in expression form)*, returns the number of items per hour. >Usage: ```/calc rates ```
๐ŸŽฒ Generate Random Number Given a maximum and/or minimum value, returns a random number between those values (inclusive). If just a maximum value is entered, picks a random number from 0 to the max value (inclusive). >Usage:```/calc random ``` >Usage: ```/calc random minmax ```
๐Ÿ’ช Comparator Strength Calculator Given a container and a desired comparator signal strength, returns the number of items needed to achieve that signal strength. >Usage: ```/calc signaltoitems ```
๐Ÿท Piglin Bartering Utils Calculates the average amount of gold ingots to barter to get a number of a desired item *(togold)*, or the average amount of an item that will be recieved when bartering a number of gold ingots *(toitem)*. >Usage: ```/calc barter togold ``` >Usage: ```/calc barter toitem ```
๐Ÿงฎ Custom Functions Custom functions are reusable commands that perform a specific computation. Custom functions can be run in any number field formatted with the function name and the parameters in parentheses ```functionname(param1, paramN)```. **Creating a Function:** Custom functions can have any number of parameters, specified in [square] brackets when adding a function. |โš ๏ธ Using any numbers or special characters in a parameter may result in a broken function.| |:-:| Ex) ```/calc custom add blockstoingots [numBlocks]*9``` | /calc blockstoingots(72) | |:-:| | ![blockstoingots(72) = 648](https://i.ibb.co/FK35cqK/CalcFn.png) | >Usage: ```/calc custom add ``` >Usage: ```/calc custom run ``` >Usage: ```/calc ()``` >Usage: ```/calc custom list``` >Usage: ```/calc custom remove ```

โžก๏ธ Converters:

Shulker Boxes โ†” Items Given a number of full Shulker Boxes *(can be in expression form)*, returns the number of items, or vice versa. >Usage: ```/calc itemtosb ``` >Usage: ```/calc sbtoitem ```
Items โ†” Stacks: Given a number of items *(can be in expression form)*, returns the number of stacks and remainder items, or vice versa. >Usage: ```/calc itemtostack ``` >Usage: ```/calc stacktoitem ```
Seconds โ†’ Hopper Clock Items Given a number of seconds *(can be in expression form)*, returns the number of items needed in a hopper clock to achieve that time. *Uses formula and hopper clock from [hoppertimer.net](https://hoppertimer.net/).* ![final.png](https://i.postimg.cc/pVg9W6Gw/final.png) >Usage: ```/calc secondstohopperclock ```
Seconds โ†’ Repeater Delay Given a number of seconds *(can be in expression form)*, returns the number of repeaters and their delay. > Usage: ```/calc secondstorepeater ```

โŽ Variables

Variables can be used inside commands in any number field. They act as shortcuts instead of having to remember that "a double chest full of 16 stackable items is 864." If no stack size is given, variables default to the contextualized stack size in each command.

Constant Variables | **Name** | **Value** | |----------|---------------| | dub | 3456 (default)| | dub64 | 3456 | | dub16 | 864 | | dub1 | 54 | | sb | 1728 (default)| | sb64 | 1728 | | sb16 | 432 | | sb1 | 27 | | stack | 64 (default) | | stack64 | 64 | | stack16 | 16 | | stack1 | 1 | | min | 60 | | h | 3600 |

Dynamic variables change depending on an in-game status. These can be particularly useful inside custom functions.

Dynamic Variables | **Name** | **Value** | |----------|----------------| | x | player x coord | | y | player y coord | | z | player z coord | | health | player health |