onyxlib-mcb
A library for mc-build that implements functions from Onyx
Usage
Simply extract onyxlib.zip
from the releases tab straight into your src
directory.
The library is split into 3 parts: calc_xp_points
, rng
, and math
.
See below for a list of macros that this library provides:
-
calc_xp_points
- import withimport ./onyxlib/calc_xp_points
calc_xp_points
- (Usage:macro calc_xp_points <targets>
. Output is stored in<player_name> onyx.xp_points
.)
-
rng
- import withimport ./onyxlib/rng
rand_int
- (Usage:macro rand_int min max
. Bothmin
andmax
are inclusive. Output is stored in$output onyx.rng
.)
-
math
- import withimport ./onyxlib/math
sin
- (Usage:macro sin <theta>
ormacro sin <player> <objective>
. Output is stored in$output onyx.math
.)cos
- (Usage:macro cos <theta>
ormacro cos <player> <objective>
. Output is stored in$output onyx.math
.)tan
- (Usage:macro tan <theta>
ormacro tan <player> <objective>
. Output is stored in$output onyx.math
.)pow
- (Usage:macro pow <player> <objective> <exponnent>
. Output is stored in$output onyx.math
.)sqrt
- (Usage:macro sqrt <value>
ormacro sqrt <player> <objective>
. Output is stored in$output onyx.math
.)NOT
- (Usage:macro NOT <value>
ormacro NOT <player> <objective>
. Output is stored in$output onyx.bitwise
)AND
- (Usage:macro AND <player> <objective> <value>
ormacro AND <player> <objective> <player2> <objective2>
. Output is stored in$output onyx.bitwise
)LEFT_SHIFT
- (Usage:macro LEFT_SHIFT <player> <objective> <value>
ormacro LEFT_SHIFT <player> <objective> <player2> <objective2>
. Output is stored in$output onyx.bitwise
)RIGHT_SHIFT
- (Usage:macro RIGHT_SHIFT <player> <objective> <value>
ormacro RIGHT_SHIFT <player> <objective> <player2> <objective2>
. Output is stored in$output onyx.bitwise
)OR
- (Usage:macro OR <player> <objective> <value>
ormacro OR <player> <objective> <player2> <objective2>
. Output is stored in$output onyx.bitwise
)XOR
- (Usage:macro XOR <player> <objective> <value>
ormacro XOR <player> <objective> <player2> <objective2>
. Output is stored in$output onyx.bitwise
)
For more information on output scale, input scale, etc., see the onyx documentation.
Credits
- Nitro (Creator of mc-build)
- vdvman1 (Creator of Phi, used for the RNG and bitwise modules)
- Part Toon (Creator of the square root functions)
- Ancientkingg and SnaveSutit (Helped me learn mc-build)