Other Data Types - TheComputerGeek2/MagicSpells GitHub Wiki
- Cast items are defined the same as a Magic Item String.
- You can instead reference one of your predefined Magic Items.
- You can control what properties of Cast Items are ignored globally with general options.
Block data is a pair of Material and its possible block states. The material part is case insensitive, meaning it could be lowercase. Format:
material[state_1=value_1, state_2=value_2, ...]block_without_state: "stone"
block_with_state: "quartz_stairs[waterlogged=true]"- Costs represent a string list of spell reagents.
- Follows format:
<type> <data> -
typecan be:health,mana,hunger,experience,levels,variable,durability, ormoney(if Vault plugin is present). -
datafor all types should be the quantity required (double value, 1 by default), except forvariable, which should be the variable name before quantity. (e.g.variable varName 10) - You can also require items as costs. Format for that is
<item> <quantity>, whereitemshould follow Magic Item String format, and quantity is 1 by default.
A boolean state may either be exclusively on, exclusively off, or toggling between either state. Use the following values for:
-
on:
on,yes,true,enable, orenabled -
off:
off,no,false,disable, ordisabled -
toggle:
toggle, orswitch
One of:
arrowdragonfireballeggenderpearlfireballfishhooklargefireballlingeringpotionllamaspitshulkerbulletsmallfireballsnowballspectralarrowsplashpotionthrownexpbottlethrownpotion-
(Removed since 4.0 Beta 14.)tippedarrow tridentwitherskull
One of:
forwardbackwardleftrightjumpsneaksprint
A Predicate checks if the target value passed to it matches a Boolean expression.
- If you specify a value alone, only that value can match the target value.
- You can refine the selection with logical operators (e.g.
value_1 & value_2):- And (
&) - Select values that match both conditions. - Or (
|) - Select values that match either condition. - XOR (
^) - Select values that match only one of the conditions.
- And (
- Prefix an expression with
!to exclude values that match it. - You can use parentheses (e.g.
(and)) to group expressions. All the above operators can be applied to groups too to craft more complex filters:
(value_1 | value_2) & value_3 & !(value_4 & value_5)You can find a color picker tool here. May be in formats:
Hex number, from 000000 to ffffff (Red, Green, Blue). It may be optionally prefixed with #.
color_1: c0ffee
# Must be in quotes if it starts with # because it'll otherwise be a YAML comment.
color_2: #ff0000 Each component may be in the range [0, 255].
color:
red: 0
green: 0
blue: 0 Very similar to Color, with an additional Alpha channel specifying color opacity. Add it to the existing Color format like so:
- String: Two hexadecimal digits before a color's "RGB" section (e.g.
#c0ffee->#ffc0ffee, whereffis255decimal, or100%opacity). - Config: Additional
alphavalue in range[0, 255]which equates to0-100%.
Represents a decimal angle value used for pitch and yaw. It optionally supports starting with a ~ to specify a relative angle and its value may be an expression.
Defines a 3D vector (x, y, z). Config and List formats support dynamic values through expressions. Formats:
vector: "0,1,3" # "x,y,z"vector:
x: 10
y: 4
z: 6vector_expanded:
- 1
- 4
- 3
vector_compact: [1, 4, 3]