Other Data Types - TheComputerGeek2/MagicSpells GitHub Wiki
Types listed here:
- Cast Items
- Block Data
- Attributes
- Reagents
- Boolean State
- Entity Type
- Potion Effect Type
- Projectile Types
- Block Tags
- Entity Tags
- Particle
- Color
- ARGB Color
- Angle
- Vector
- 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]"
- 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.
attributes:
- generic_movement_speed 1 add_number
- Costs represent a string list of reagents of the spell.
- Follows format:
<type> <data>
-
type
can be:health
,mana
,hunger
,experience
,levels
,variable
,durability
, ormoney
(if Vault plugin is present). -
data
for 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>
, whereitem
should 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
Spigot's entity type or Vanilla entity resource location entity type. It's case-insensitive and underscores are optional - words can be connected.
Case-insensitive Spigot's potion type or Vanilla potion resource location.
Case-insensitive Spigot's particle name, Vanilla ID, or any valid Resource Location / Namespaced ID.
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
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.
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.
You can find a color picker tool here. May be in formats:
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
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 the "RGB" section of a color. (E.g.
#c0ffee
->#ffc0ffee
, whereff
is255
decimal, or100%
opacity) - Config: Additional
alpha
value in range[0, 255]
which equates to0-100%
.
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.
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: 6
vector_expanded:
- 1
- 4
- 3
vector_compact: [1, 4, 3]