SimpleCalc

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

SimpleCalc

- inspired by uCalc (Thx Sosser for giving me an idea on what to start making plugins for Bukkit) -

Description:

SimpleCalc is a chat/console based calculator. It can calculate any mathematical expression containing decimals and the following operators:

  1. Addition: +
  2. Subtraction: -
  3. Multiplication: *
  4. Division: /
  5. Powers: ^
  6. Remainder: %
  7. Parentheses: ( and )
  8. ANS variable
  9. Functions: sin, cos, log, ln, sqrt, spawnX/Y/Z, locX/Y/Z
  10. Math constants: pi, e

Here are some examples of propper expressions:

  • 5.6+3.3 or 5,6+3,3
  • 3*4+5
  • (3+4)*3/8
  • (7+2^4)/3
  • -5*3
  • (-7+3*(12%5))/32
  • After executing one calculation: ANS()+3

To use pi and the loc and spawn functions, append () to them!

You can separate the numbers/operators with spaces or not, both will be accepted and, if the expression is valid, will be calculated. The parantheses in ANS() are needed to work!

If you have Spout installed and use the Spoutcraft client you can now open a Calculator Window by using "/calc" without any arguments!

Invalid Image

Command(s):

Quote:

/calc <expression>: Calculates the given mathematical expression
Alias: /scalc <expression>

Quote:

/calc: If Spout is installed it opens the Calculator Panel (needs Spoutcraft Client), else views the help
Alias: /scalc

DEV Version:

Download & Source:

SimpleCalc is released under GNU GPLv3 for more information, refer here.

CB 1.1-R6 and Newer:
Download v 2.4
Mirror(BukkitDev)

Download v2.3

CB 1.1-R3/CB 1.1-R4:
v2.2 (BukkitDev)


CB#1185 & CB#1240:
Download v 2.1
Mirror(BukkitDev)

Download v 2.0
Mirror(BukkitDev)


Source:
Source on GitHub

Bukkit Forums Post

TO-DO:

Changelog:

  • v2.4
    • Fixed Listener throwing errors when spout was not installed
    • Fixed loading errors if spout was not installed
    • Added two new functions: distance2D() and distance3D(). It calculates the distance between the player and the spawn location either in the xz-plane(2D) and in xyz(3D)
    • Added possibility to use the keyboard while the GUI is open to enter an expression, but currently no capital letters are possible if the text field is not selected.
    • Added a Key-Binding when Spout is installed to open the GUI without the need to enter the command /calc. Default is C but it can be changed by the user!
  • v2.3
    • Added variables: You can now set variables with /calc set <variable> <value>. A variable is any letter except small e. Like: a,B,Z,O and g
    • Added more functions like: sin, cos, sqrt, ln....
    • Added SpawnX(), SpawnY(), SpawnZ() and LocX(), LocY(), LocZ() to get the locations of the spawn from your current world and your current location. This does only work when used ingame from a player!
    • Added "Sience" window to the gui to use the new functions.
  • v2.2
    • Updated to new EventSystem
    • Added ANS function.
    • Rearranged CalcWindow
  • v2.1:
    • Change in namespace
    • Made the error messages a bit more specific.
  • v2.0:
    • BUGFIX: Commas threw an error instead of beeing accepted
    • FEATURE: Spout support. You can now use /calc to open a Calculator Window
    • Update to CB #1185
  • v1.0:
    • Initial release

Version 0.1 to 0.9 are merely a list of my development progression:


  • v0.1:
    • Initial start of coding the plugin
  • v0.2:
    • Added all math functions i thought would be nice to have
  • v0.3:
    • Added RegEx functions for normal 2 arguments calculation (this means we do have a working 2 values calculator \o/)
  • v0.4:
    • Started working on a parser to make complex calculations possible
  • v0.5:
    • Removed original RegEx functions
    • Created logic for the parser
  • v0.6:
    • Created logic to compute the given equation
  • v0.7:
    • Created my own Exception class to pass through parser errors
  • v0.8 and v0.9:
    • Several bug fixes and corrections

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files