-
Notifications
You must be signed in to change notification settings - Fork 147
Equations
Brushette edited this page Mar 11, 2018
·
6 revisions
Magic uses exp4j in a few places to allow you to specify parameters in terms of equations.
See here for a list of builtin functions: https://www.objecthunter.net/exp4j/#Built-in_functions
In addition, Magic adds a rand(min,max) function for randomizing values.
Equations can be used in the EquationEffect for custom effects, CustomProjectile to control projectile paths, ArmorStandProjectile to control armor stand limbs, and spell parameters.
Attributes can be used in equations.
To use equations in "amount" parameters, you need to use ceil function
amount: "rand(ceil(5/2),ceil(10/3))"
TODO: Examples!
- Home
- FAQ
- Support
- Progression
- Spell Points
- Crafting
- Basic Setup
- Customization
- Resource Pack
- Examples
- Messages and Languages
- Vanity Items
- NPCs
- Magic Blocks
- Magic Mobs
- Putting Images on Maps
- Using MySQL or SQLite
- Placeholders
- Skript
- Regions