Other Data Types - TheComputerGeek2/MagicSpells GitHub Wiki

Cast Items:


Block Data:

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, ...]

Examples:

block_without_state: "stone"
block_with_state: "quartz_stairs[waterlogged=true]"

Reagents:

  • Costs represent a string list of spell reagents.
  • Follows format: <type> <data>
  • type can be: health, mana, hunger, experience, levels, variable, durability, or money (if Vault plugin is present).
  • data for all types should be the quantity required (double value, 1 by default), except for variable, 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>, where item should follow Magic Item String format, and quantity is 1 by default.

Boolean State:

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, or enabled
  • off: off, no, false, disable, or disabled
  • toggle: toggle, or switch

Projectile Types:

One of:

  • arrow
  • dragonfireball
  • egg
  • enderpearl
  • fireball
  • fishhook
  • largefireball
  • lingeringpotion
  • llamaspit
  • shulkerbullet
  • smallfireball
  • snowball
  • spectralarrow
  • splashpotion
  • thrownexpbottle
  • thrownpotion
  • tippedarrow (Removed since 4.0 Beta 14.)
  • trident
  • witherskull

Movement Input:

Input Type:

One of:

  • forward
  • backward
  • left
  • right
  • jump
  • sneak
  • sprint

Input Filter:

  • You can select a specific Input Type.
  • You can refine the selection with logical operators (e.g. left & forward):
    • And (&) - Select inputs that match both conditions.
    • Or (|) - Select inputs that match either condition.
    • XOR (^) - Select inputs that match only one of the conditions.
  • Prefix an expression with ! to exclude inputs that match it.
  • You can use parentheses to group expressions. All the above operators can be applied to groups too to craft more complex filters:
(left | right) & forward & !(sneak & sprint)

Color:

You can find a color picker tool here. May be in formats:

String:

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 

Config:

Each component may be in the range [0, 255].

color:
  red: 0
  green: 0
  blue: 0 

ARGB Color:

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, where ff is 255 decimal, or 100% opacity).
  • Config: Additional alpha value in range [0, 255] which equates to 0-100%.

Angle:

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.


Vector:

Defines a 3D vector (x, y, z). Config and List formats support dynamic values through expressions. Formats:

String:

vector: "0,1,3" # "x,y,z"

Config:

vector:
  x: 10
  y: 4
  z: 6

List:

vector_expanded:
  - 1
  - 4
  - 3
vector_compact: [1, 4, 3]

Magic without writing Java

This is just some padding so that the header linking experience is better.

MagicSpells Icon
⚠️ **GitHub.com Fallback** ⚠️