Other Data Types - TheComputerGeek2/MagicSpells GitHub Wiki

Table Of Contents:

Types listed here:


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]"

Attributes:

  • A list of strings representing attribute modifications.
  • Format: <attribute> <value> [operation].
  • Attributes can be any case and are as listed here.
  • Operations can also be any case, are as listed here, and are by default add_number.
  • When defined on Magic Items, you can also add a [slot] after [operation], which by default applies the attribute modifier to all slot types.

Example:

attributes:
    - generic_movement_speed 1 add_number

Reagents:

  • Costs represent a string list of reagents of the spell.
  • 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

Entity Type:

Spigot's entity type or Vanilla entity resource location entity type. It's case-insensitive and underscores are optional - words can be connected.


Potion Effect Type:

Case-insensitive Spigot's potion type or Vanilla potion resource location.


Particle:

Case-insensitive Spigot's particle name, Vanilla ID, or any valid Resource Location / Namespaced ID.


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

Block tags:

It may be a Vanilla block tag with or without the minecraft: namespace or one of Paper's custom material tags, the format for which should be paper:<field>_settag, where <field> should be a lowercase element from their MaterialTags (e.g. paper:armor_settag) class.


Entity tags:

It may be a Vanilla entity type tag with or without the minecraft: namespace or one of Paper's custom entity tags, the format for which should be paper:<field>_settag, where <field> should be a lowercase element from their EntityTags (e.g. paper:horses_settag) class.


Color:

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

String:

Hex number, from 000000 to ffffff (Red, Green, Blue). 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 the "RGB" section of a color. (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:

An angle value which is 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]
⚠️ **GitHub.com Fallback** ⚠️