Tags
Built-in placeholders for generating random elements or evaluate math equations
Chance
Get an element from a list using a chance system (0 to 100, supporting decimals).
Format: chance:{(chance)=(item),(chance)=(item),default=(default item)}
Placeholders can be used for chance
and using the default
keyword instead of a chance, you can specify a default value for when the player is unlucky. If no default value is specified, nothing
will be returned.
Examples:
chance:{85=STONE 65,10=COAL 64,5=DIAMOND 4,default=DIRT 1}
- 85% forSTONE 64
, 10% forCOAL 64
, 5% forDIAMOND 4
and the default valueDIRT 1
Math
Powered by EvalEx, the math tag allows to evaluate math equations to get the result.
Format: math:{(scale),<equation>}
or math:{<equation>}
Examples:
math:{3,10 / 3}
= 3.000math:{10 / 3}
= 3
Random Double
Generate a random Double between a min (inclusive) and max (inclusive) value.
Format: random:{(precision),<min>,<max>}
or math:{<min>,<max>
Examples:
random:{0,100}
= 5.215616126 (withoutprecision
all decimals are returned)random:{3,0-100}
= 5.231
Random Element
Pick a random element from a comma separated list
Format: randomE:{E1,E2,E3...,En}
Examples:
randomE:{Epic,Rare,Common}
- pick a random StringrandomE:{112,1948,9684,132}
- pick a random numberrandomE:{Text,14918,AnotherText,1515}
- the elements can be anything
Random Long
Generate a random Long between a min (inclusive) and max (inclusive) value. Format: randomL:{<min>,<max>} Examples:
randomL:{0,12345678901234567}
Last updated