I hate pulling out my calculator to do math for my redstone projects
cmp(1,5,2)
cmp()
compare signal strengths, just like a comparator
/eval <program>
- Add, subtract, multiply, divide numbers in the minecraft commandline.
- Create simple functions to remove redundant routines.
- Bind native functions
- sin,cos,min,max, and more!
- PR's needed to add more.
Syntax :
A program consists of zero or more functions and an optional expression. If no expression exists, 0 is the result.
fn ident(id, id1, id2) = expr
fn ident() = expr
Basically, any math calculator, positive numbers only!
1 + 2 - 5
sin(rad(0))
- yields
.49999
Built in constants are PI
, E
, CHUNK
, SIG_MAX
- A CHUNK is 16 ( in minecraft )
- SIG_MAX is 15 (the maximum signal strength of redstone)
- natives
cmp
,cmp_sub
- This is a gradle project, and two main scripts exist
- I use intellij to simplify the workflow.
- Running on graal jdk 21 while developing.
To build the JAR file using Gradle, follow these steps:
- Ensure you have Gradle installed. Usually Intellij has it built into the IDE.
- If not, you can install following these instructions here.
- Open a terminal and navigate to the root directory of the repository.
- Run the following command to build the JAR file:
./gradlew build
- If you are using intellij, run the build script might be easier
- Open Issues
- Read this
- Open a pull request.
- I'll review it!