Skip to content

5. Spell Actions JSON Formats

CAS_ual_TY edited this page Jun 20, 2026 · 24 revisions

Spell Actions

Overview

AI Actions
Attribute Actions
Control Flow Actions
Delayed Spell Actions
Effect Actions
FX Actions
Item Actions
Level (World) Actions
Mana Actions
Server Actions
Target Actions
Variable Actions
Variable / Mapped Unary Functions Actions
Variable / Mapped Binary Functions Actions
Variable / Mapped Ternary Functions Actions


AI Actions


clear_mob_target Type

Make a mob forget their current target they are attacking or following.

JSON Format:

{
  "type": "spells_and_shields:clear_mob_target",
  "activation": String,
  "ts/mobs": String
}

Elements:

  • ts/mobs: All living entity targets (must be mobs) that should forget their current attack target.

get_mob_target Type

Get the current target a mob is attacking or following.

JSON Format:

{
  "type": "spells_and_shields:get_mob_target",
  "activation": String,
  "t/source": String,
  "td/target": String,
  "var/has_target": String
}

Elements:

  • t/source: The living entity target (mob) to get the target from.
  • td/target: The target group to put the mob's target into (if such a target exists).
  • var/has_target: The boolean variable to store true in if such a target exists, or false if it does not exist.

set_mob_target Type

Set the attack target of mobs to a specific living entity.

JSON Format:

{
  "type": "spells_and_shields:set_mob_target",
  "activation": String,
  "t/target": String,
  "ts/mobs": String
}

Elements:

  • t/target: The living entity target all mobs should attack.
  • ts/mobs: All living entity targets (mobs) that should attack the set target.

Attribute Actions


check_tag Type

Check whether an object of a set type is tagged with a specific tag.

JSON Format:

{
  "type": "spells_and_shields:check_tag",
  "activation": String,
  "string/registry_id": String,
  "d/string/tag": String,
  "d/string/entry_id": String
}

Elements:

  • string/registry_id: The registry ID the object belongs to.
  • d/string/tag: The tag to check for.
  • d/string/entry_id: The ID of this object in the registry.

get_attribute_value Type

Get the value of an attribute of a living entity. See https://minecraft.fandom.com/wiki/Attribute

JSON Format:

{
  "type": "spells_and_shields:get_attribute_value",
  "activation": String,
  "t/target": String,
  "d/string/attribute": String,
  "var/amount": String,
  "var/default_amount": String
}

Elements:

  • t/target: The living entity target to get the attribute value from.
  • d/string/attribute: The ID of the attribute to get the value from.
  • var/amount: The variable to store the current value in.
  • var/default_amount: The variable to store the default value in (attribute modifiers are ignored).

get_entity_extra_tag Type

Get the extra tag of an entity. The extra tag is a way to permanently store information.

JSON Format:

{
  "type": "spells_and_shields:get_entity_extra_tag",
  "activation": String,
  "t/source": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The entity to get the extra tag from.
  • var/compound_tag: The variable to store the extra tag in.

get_entity_eye_position Type

Get the eye position of an entity. The actual position of eg. the player is at the bottom of the feet while the eye position is usually at the center of the head (higher).

JSON Format:

{
  "type": "spells_and_shields:get_entity_eye_position",
  "activation": String,
  "t/source": String,
  "td/eye_position": String
}

Elements:

  • t/source: The entity target to get the eye position from.
  • td/eye_position: The target group to store the eye position in (stored as position).

get_entity_position_direction Type

Get the position, look direction, and motion (per tick) of an entity.

JSON Format:

{
  "type": "spells_and_shields:get_entity_position_direction",
  "activation": String,
  "t/source": String,
  "td/position": String,
  "var/direction": String,
  "var/motion": String
}

Elements:

  • t/source: The entity to get these attributes from.
  • td/position: The target group to store the position in (position target).
  • var/direction: The variable to store the look vector in.
  • var/motion: The variable to store the motion in.

get_entity_tag Type

Save the entity to an NBT Compound Tag to get information otherwise not accessible via spell actions.

JSON Format:

{
  "type": "spells_and_shields:get_entity_tag",
  "activation": String,
  "t/source": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The entity to get information from.
  • var/compound_tag: The variable to store the NBT Compound Tag in the entity has been saved to.

get_entity_type Type

Get the ID of an entity and whether or not it is a player and/or a living entity.

JSON Format:

{
  "type": "spells_and_shields:get_entity_type",
  "activation": String,
  "t/source": String,
  "var/entity_type": String,
  "var/is_living": String,
  "var/is_player": String
}

Elements:

  • t/source: The entity to get information from.
  • var/entity_type: The variable to store the ID of the entity in.
  • var/is_living: The variable to store true in if the entity is a living entity (it has health), false if it is not a living entity (eg. a painting).
  • var/is_player: The variable to store true in if the entity is a player, false otherwise.

get_entity_uuid Type

Get the UUID of an entity.

JSON Format:

{
  "type": "spells_and_shields:get_entity_uuid",
  "activation": String,
  "t/source": String,
  "var/uuid": String
}

Elements:

  • t/source: The entity to get the UUID from.
  • var/uuid: The variable to store the UUID in (as a String).

get_is_creative Type

Get whether or not the player is in creative mode.

JSON Format:

{
  "type": "spells_and_shields:get_is_creative",
  "activation": String,
  "t/source": String,
  "var/is_creative": String
}

Elements:

  • t/source: The player target.
  • var/is_creative: The variable to store the result in, true if the player is in creative mode, false otherwise.

get_player_name Type

Get the in-game name of a player target.

JSON Format:

{
  "type": "spells_and_shields:get_player_name",
  "activation": String,
  "t/source": String,
  "var/player_name": String
}

Elements:

  • t/source: The player target to get the name from.
  • var/player_name: The variable to store the player name in.

get_position Type

Get (copy) the position of a target. If said target is moved the new target will not change and will still point to the original position.

JSON Format:

{
  "type": "spells_and_shields:get_position",
  "activation": String,
  "t/source": String,
  "var/position": String
}

Elements:

  • t/source: The target to get the position from.
  • var/position: The target group to store the position in.

Control Flow Actions


activate Type

Enable another activation.

JSON Format:

{
  "type": "spells_and_shields:activate",
  "activation": String,
  "a/to_activate": String
}

Elements:

  • a/to_activate: The other activation to enable.

boolean_activation Type

Enable and/or disable an activation based on the given boolean value.

JSON Format:

{
  "type": "spells_and_shields:boolean_activation",
  "activation": String,
  "a/to_activate": String,
  "d/boolean/input": Boolean,
  "d/boolean/activate_if_true": Boolean,
  "d/boolean/deactivate_if_false": Boolean
}

Elements:

  • a/to_activate: The activation to enable and/or disable.
  • d/boolean/input: The boolean input influencing whether or not the to_activate activation is enabled/disabled.
  • d/boolean/activate_if_true: If this is true and input is true then to_activate gets enabled, otherwise nothing happens.
  • d/boolean/deactivate_if_false: If this is true and input is false then to_activate gets disabled, otherwise nothing happens.

branch Type

Jumps to a set label if a given conditional is true.

JSON Format:

{
  "type": "spells_and_shields:branch",
  "activation": String,
  "label": String,
  "d/boolean/conditional": Boolean
}

Elements:

  • label: The name of the label.
  • d/boolean/conditional: If this is true the next action executed is the one after the given label, otherwise the next action executed is the one following this one.

conditional_activation Type

Enable an activation based on the given boolean value.

JSON Format:

{
  "type": "spells_and_shields:conditional_activation",
  "activation": String,
  "a/to_activate": String,
  "d/boolean/condition": Boolean
}

Elements:

  • a/to_activate: The activation to enable.
  • d/boolean/condition: If this is true then the given activation is enabled, otherwise nothing happens.

conditional_deactivation Type

Enable disable the activation based on the given boolean value.

JSON Format:

{
  "type": "spells_and_shields:conditional_deactivation",
  "activation": String,
  "d/boolean/condition": Boolean
}

Elements:

  • d/boolean/condition: If this is true then the activation this action is based on is disabled.

deactivate Type

Disable an activation.

JSON Format:

{
  "type": "spells_and_shields:deactivate",
  "activation": String,
  "a/to_deactivate": String
}

Elements:

  • a/to_deactivate: The activation to disable.

jump Type

Jump to a set label. The next action executed will be the one right after the label action.

JSON Format:

{
  "type": "spells_and_shields:jump",
  "activation": String,
  "label": String
}

Elements:

  • label: The name of the label.

label Type

Set a label at the position of this action.

JSON Format:

{
  "type": "spells_and_shields:label",
  "activation": String,
  "label": String
}

Elements:

  • label: The name of the label to set.

terminate Type

End the execution of this spell. No more actions will be executed after this.

JSON Format:

{
  "type": "spells_and_shields:terminate",
  "activation": String
}

Delayed Spell Actions


add_delayed_spell Type

Add a delayed spell instance to targets. It will execute the spell again for each target with a set activation after a set period of time. It also allows you to hook into events of targets that do not have the spell equipped.

JSON Format:

{
  "type": "spells_and_shields:add_delayed_spell",
  "activation": String,
  "ts/targets": String,
  "ad/on_remove": String,
  "d/int/tick_time": Integer,
  "d/string/uuid": String,
  "d/compound_tag/extra_data": NBT Compound Tag,
  "events_map": Optional Events Map
}

Elements:

  • ts/targets: The targets to apply this delayed spell instance to (applied to each target).
  • ad/on_remove: The activation to fire when this delayed spell is removed (when the time ran out).
  • d/int/tick_time: The time in ticks after which to remove this delayed spell.
  • d/string/uuid: The UUID for this delayed spell instance used for identification. This value may be left empty but it may not be left out entirely. If an invalid UUID is specified a random one will be generated insteadfor each delayed spell instance attached.
  • d/compound_tag/extra_data: An NBT Compound Tag to supply extra data for future use. This value may be left empty but it may not be left out entirely.
  • events_map: A JSON Object with keys and values being strings. Every key/value pair represents an event (key) that is executed under a differently named activation (value) from the perspective of the target the delayed spell is attached to. Eg. {"living_hurt_victim": "target_hurt_victim"} results in the activation target_hurt_victim being fired when a target would fire a living_hurt_victim event. This way you can differentiate between the owner of the spell and any delayed spell target firing this event (every target that would reference the owner instead references said target).

check_has_delayed_spell Type

Check whether or not a target entity has a delayed spell instance with a certain UUID attached. If not the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:check_has_delayed_spell",
  "activation": String,
  "t/target": String,
  "d/string/uuid": String
}

Elements:

  • t/target: The entity target to check.
  • d/string/uuid: The UUID to look for.

remove_delayed_spell Type

Remove a delayed spell instance based on a UUID from a target entity.

JSON Format:

{
  "type": "spells_and_shields:remove_delayed_spell",
  "activation": String,
  "ts/targets": String,
  "d/string/uuid": String,
  "d/boolean/force_activate": Boolean
}

Elements:

  • ts/targets: The targets to remove the delayed spell instance from.
  • d/string/uuid: The UUID of the delayed spell instance to remove.
  • d/boolean/force_activate: Set to true to fire the on-removal event of the delayed spell instance, false to just remove it without any activations.

Effect Actions


add_attribute_modifier Type [Starting 1.21.1]

Apply attribute modifiers to entities permanently. See https://minecraft.fandom.com/wiki/Attribute#Modifiers

JSON Format:

{
  "type": "spells_and_shields:add_attribute_modifier",
  "activation": String,
  "ts/targets": String,
  "d/string/attribute": String,
  "d/string/name": String,
  "d/double/amount": Double,
  "d/string/operation": String
}

Elements:

  • ts/targets: The living entity targets to apply the modifier on.
  • d/string/attribute: The attribute ID.
  • d/string/name: The ResourceLocation ID of this modifier, used for identification (eg. to remove it again with remove_attribute_modifier).
  • d/double/amount: The amount changed.
  • d/string/operation: How the amount impacts the total amount. The allowed values are add, multiply_base, and add_multiplied_total.

add_attribute_modifier Type [Up to 1.20.2]

Apply attribute modifiers to entities permanently. See https://minecraft.fandom.com/wiki/Attribute#Modifiers

JSON Format:

{
  "type": "spells_and_shields:add_attribute_modifier",
  "activation": String,
  "ts/targets": String,
  "d/string/attribute": String,
  "d/string/uuid": Optional String,
  "d/string/name": String,
  "d/double/amount": Double,
  "d/string/operation": String
}

Elements:

  • ts/targets: The living entity targets to apply the modifier on.
  • d/string/attribute: The attribute ID.
  • d/string/uuid: The UUID of the modifier used for identification (eg. to remove it again). This may be left out which results in a randomly generated UUID being used instead.
  • d/string/name: The name of this modifier.
  • d/double/amount: The amount changed.
  • d/string/operation: How the amount impacts the total amount. The allowed values are add, multiply_base, and multiply_total (referenced as multiply in the wiki).

apply_entity_extra_tag Type

Override the extra tag of an entity. The extra tag is a way to permanently store information. Since other spells use this as well, you should override this by first getting the current extra tag of the entity (instead of making a new empty one), then adding your data to that, then overriding it. This way you do not wipe data of other spells.

JSON Format:

{
  "type": "spells_and_shields:apply_entity_extra_tag",
  "activation": String,
  "ts/targets": String,
  "d/compound_tag/tag": NBT Compound Tag
}

Elements:

  • ts/targets: The entity targets to apply this extra tag to.
  • d/compound_tag/tag: The extra tag to apply.

apply_entity_tag Type

This actions is used to apply entity specific attributes to an entity. Basically the entity is stored to an NBT tag, this tag is then merged with the tag supplied by this action with any key-value pair of this action overriding the ones of the tag the entity was saved to, then the entity is loaded again from this new merged tag. See https://minecraft.fandom.com/wiki/Entity_format

JSON Format:

{
  "type": "spells_and_shields:apply_entity_tag",
  "activation": String,
  "ts/targets": String,
  "d/compound_tag/tag": NBT Compound Tag
}

Elements:

  • ts/targets: The entity targets to apply the tag to.
  • d/compound_tag/tag: The NBT tag containing the values to apply to the entity.

apply_mob_effect Type

Apply a mob effect to entities (eg. Haste, Poison, ...). See https://minecraft.fandom.com/wiki/Effect#Effect_list

JSON Format:

{
  "type": "spells_and_shields:apply_mob_effect",
  "activation": String,
  "ts/targets": String,
  "d/string/mob_effect": String,
  "d/int/duration": Integer,
  "d/int/amplifier": Integer,
  "d/boolean/ambient": Boolean,
  "d/boolean/visible": Boolean,
  "d/boolean/showIcon": Boolean
}

Elements:

  • ts/targets: The living entity targets to apply the mob effect on.
  • d/string/mob_effect: The ID of the mob effect.
  • d/int/duration: The duration in ticks.
  • d/int/amplifier: The amplifier starting at 0.
  • d/boolean/ambient: true if this effect has come from an ambient source (eg. Beacon, Conduit, ...), false otherwise.
  • d/boolean/visible: true to make this effect spawn ambient particles around the entity, false to not spawn any.
  • d/boolean/showIcon: true to show this icon show on the client in the inventory, false to not show it.

apply_potion_effect Type

Apply a potion effect to entities. See https://minecraft.fandom.com/wiki/Potion#Data_values

JSON Format:

{
  "type": "spells_and_shields:apply_potion_effect",
  "activation": String,
  "ts/targets": String,
  "d/string/potion": String
}

Elements:

  • ts/targets: The living entity targets to give the potion to.
  • d/string/potion: The ID of the potion.

damage Type

Deal magic damage to entities without a specified source.

JSON Format:

{
  "type": "spells_and_shields:damage",
  "activation": String,
  "ts/targets": String,
  "d/double/damage": Double
}

Elements:

  • ts/targets: The living entity targets to deal damage to.
  • d/double/damage: The amount of damage.

heal Type

Heal entities.

JSON Format:

{
  "type": "spells_and_shields:heal",
  "activation": String,
  "ts/targets": String,
  "d/double/healing_amount": Double
}

Elements:

  • ts/targets: The living entity targets to heal.
  • d/double/healing_amount: The amount to heal.

knockback Type

Knock back target entities in a given direction.

JSON Format:

{
  "type": "spells_and_shields:knockback",
  "activation": String,
  "ts/targets": String,
  "d/double/strength": Double,
  "d/double/dx": Double,
  "d/double/dz": Double
}

Elements:

  • ts/targets: The living entity targets to knock back.
  • d/double/strength: How strongly to knock them back.
  • d/double/dx: The force along the x-axis (may be negative).
  • d/double/dz: The force along the z-axis (may be negative).

remove_attribute_modifier Type [Starting 1.21.1]

Remove an attribute modifier from entities based on the attribute and the ResourceLocation ID.

JSON Format:

{
  "type": "spells_and_shields:remove_attribute_modifier",
  "activation": String,
  "ts/targets": String,
  "d/string/attribute": String,
  "d/string/id": String
}

Elements:

  • ts/targets: The living entity targets to remove the attribute modifier from.
  • d/string/attribute: The ID of the attribute.
  • d/string/id: The ResourceLocation ID of the attribute modifier to remove (must match the d/string/name used in add_attribute_modifier).

remove_attribute_modifier Type [Up to 1.20.2]

Remove an attribute modifier from entities based on the attribute and the UUID.

JSON Format:

{
  "type": "spells_and_shields:remove_attribute_modifier",
  "activation": String,
  "ts/targets": String,
  "d/string/attribute": String,
  "d/string/uuid": String
}

Elements:

  • ts/targets: The living entity targets to remove the attribute modifier from.
  • d/string/attribute: The ID of the attribute.
  • d/string/uuid: The UUID of the attribute modifier to remove.

reset_fall_distance Type

Reset the fall distance of a living entity which results in less damage taken when hitting the ground. This does not stop the falling motion itself, but rather restarts the counter of the fall distance.

JSON Format:

{
  "type": "spells_and_shields:reset_fall_distance",
  "activation": String,
  "ts/targets": String
}

Elements:

  • ts/targets: The living entity targets to reset the fall distance for.

set_motion Type

Set the motion of target entities.

JSON Format:

{
  "type": "spells_and_shields:set_motion",
  "activation": String,
  "ts/targets": String,
  "d/vec3/motion": Vector
}

Elements:

  • ts/targets: The entity targets to set the motion for.
  • d/vec3/motion: The motion vector.

set_on_fire Type

Set living entities on fire for a specific amount of time.

JSON Format:

{
  "type": "spells_and_shields:set_on_fire",
  "activation": String,
  "ts/targets": String,
  "d/int/fire_seconds": Integer
}

Elements:

  • ts/targets: The living entity targets to set on fire.
  • d/int/fire_seconds: The time (in seconds) they burn.

sourced_damage Type

Deal magic damage with a specified source.

JSON Format:

{
  "type": "spells_and_shields:sourced_damage",
  "activation": String,
  "ts/targets": String,
  "d/double/damage": Double,
  "t/source": String
}

Elements:

  • ts/targets: The living entity targets to deal damage to.
  • d/double/damage: The amount of damage dealt.
  • t/source: The source entity which is responsible for the damage.

sourced_knockback Type

Apply knockback to target entities coming from a specified source position.

JSON Format:

{
  "type": "spells_and_shields:sourced_knockback",
  "activation": String,
  "ts/targets": String,
  "d/double/strength": Double,
  "t/source": String
}

Elements:

  • ts/targets: The living entity targets to apply knockback to.
  • d/double/strength: The amount of knockback.
  • t/source: The source position the knockback came from.

spawn_entity Type

Spawn an entity with all kinds of attributes. See https://minecraft.fandom.com/wiki/Entity_format

JSON Format:

{
  "type": "spells_and_shields:spawn_entity",
  "activation": String,
  "td/entity": String,
  "d/string/entity_type": String,
  "t/position": String,
  "d/vec3/direction": Vector,
  "d/vec3/motion": Vector,
  "d/compound_tag/tag": Optional NBT Compound Tag
}

Elements:

  • td/entity: The target group to put the newly spawned entity in.
  • d/string/entity_type: The ID of the entity type.
  • t/position: The position target where to spawn the entity at.
  • d/vec3/direction: The vector that represents the view vector of the spawned entity (the direction it looks).
  • d/vec3/motion: The initial motion of the entity.
  • d/compound_tag/tag: The nbt tag that the entity will be loaded from before spawning it in.

teleport_to Type

Teleport entities to a position.

JSON Format:

{
  "type": "spells_and_shields:teleport_to",
  "activation": String,
  "ts/targets": String,
  "t/position": String
}

Elements:

  • ts/targets: The entity targets to teleport.
  • t/position: The position target to teleport the entities to.

FX Actions


particle_emitter Type

Attach a particle emitter to targets. See: https://minecraft.fandom.com/wiki/Particles

JSON Format:

{
  "type": "spells_and_shields:particle_emitter",
  "activation": String,
  "ts/targets": String,
  "d/int/duration": Integer,
  "d/int/delay": Integer,
  "d/int/amount": Integer,
  "d/double/spread": Double,
  "d/boolean/motion_spread": Boolean,
  "d/vec3/offset": Vector,
  "particle": Particle
}

Elements:

  • ts/targets: The targets to apply the particle emitter to.
  • d/int/duration: The time (in ticks) the emitter stays on the targets.
  • d/int/delay: The delay between each emition of particles. Set to 1 to emit particles every tick, set to 2 to only emit particles every second tick, etc..
  • d/int/amount: The amount of times the particle is emitted on emition.
  • d/double/spread: The diameter around the original position the particle may spawn in.
  • d/boolean/motion_spread: Set to true to spread out the particles along the motion-axis of the target this emitter is attached to (you usually want to do this, especially for projectiles), false to have them all originate at the exact position of the source.
  • d/vec3/offset: The position offset to apply.
  • particle: The particle to emit.

play_sound Type

Play a sound with set volume and pitch at specific positions. See: https://minecraft.fandom.com/wiki/Sounds.json#Sound_events

JSON Format:

{
  "type": "spells_and_shields:play_sound",
  "activation": String,
  "ts/targets": String,
  "d/string/sound_event": Sound Event,
  "d/double/volume": Double,
  "d/double/pitch": Double
}

Elements:

  • ts/targets: Position targets to play the sound at.
  • d/string/sound_event: What sound to play.
  • d/double/volume: The volume.
  • d/double/pitch: The pitch. Use 1.0 as default. If the sound is played a lot you might want some slight alterations, eg. "<< 0.9 + 0.2 * random_double() >>" produces a value x with 0.9 <= x < 1.1.

spawn_particles Type

Spawn particles at a certain location.

JSON Format:

{
  "type": "spells_and_shields:spawn_particles",
  "activation": String,
  "ts/targets": String,
  "particle": Particle,
  "d/int/count": Integer,
  "d/double/spread": Double
}

Elements:

  • ts/targets: Where to spawn the particles.
  • particle: The particle to spawn.
  • d/int/count: The amount of times it is spawned at every position.
  • d/double/spread: The diameter around the positions the particles may spawn in.

Item Actions


consume_item Type

Reduce the stack size of an item target by a certain amount. If the stack size is less than the set amount to reduce it by, it will be reduced to 0.

JSON Format:

{
  "type": "spells_and_shields:consume_item",
  "activation": String,
  "ts/targets": String,
  "d/int/amount": Integer
}

Elements:

  • ts/targets: The item targets to reduce the stack size of.
  • d/int/amount: The amount to reduce the stack size by.

consume_player_items Type

Consume a certain item in a player's inventory and/or hands. The amount to consume can be set and you can also make the items have a certain NBT tag to be considered for consumption.

JSON Format:

{
  "type": "spells_and_shields:consume_player_items",
  "activation": String,
  "t/source": String,
  "d/string/item": String,
  "d/int/amount": Integer,
  "d/compound_tag/tag": Optional NBT Compound Tag,
  "d/boolean/must_be_in_hand": Boolean
}

Elements:

  • t/source: The target player to consume the item(s) of.
  • d/string/item: The item ID.
  • d/int/amount: The amount to consume.
  • d/compound_tag/tag: The NBT compound tag to further filter items by. If this is left out the NBT tag of possible item stacks will be ignored and they will simply be consumed based on item ID.
  • d/boolean/must_be_in_hand: Set to true to only consider items in the player's hands, false to consider the entire player inventory.

damage_item Type

Apply damage to an item target.

JSON Format:

{
  "type": "spells_and_shields:damage_item",
  "activation": String,
  "ts/targets": String,
  "d/int/damage": Integer
}

Elements:

  • ts/targets: The item targets to damage.
  • d/int/damage: The amount of damage to apply.

find_item Type

Find specific items in a players' inventories and store them as targets.

JSON Format:

{
  "type": "spells_and_shields:find_item",
  "activation": String,
  "ts/targets": String,
  "d/boolean/must_be_in_hand": Boolean,
  "item": Item Stack,
  "td/found_items": String
}

Elements:

  • ts/targets: The player targets to scan their inventories for items.
  • d/boolean/must_be_in_hand: Set to true to only check items in players' hands, false to check entire inventories.
  • item: The item to look for.
  • td/found_items: The target group to store the matching items in as item targets.

get_item_attributes Type [Starting 1.21.1]

Get the attributes (item ID, stack size, damage, tag) of an item target.

JSON Format:

{
  "type": "spells_and_shields:get_item_attributes",
  "activation": String,
  "t/source": String,
  "var/item": String,
  "var/amount": String,
  "var/damage": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The item target to get the attributes from.
  • var/item: The variable to store the item ID in.
  • var/amount: The variable to store the item amount (stack size) in.
  • var/damage: The variable to store the item damage in.
  • var/compound_tag: The variable to store the full item save NBT in. The structure is { "id": "...", "count": N, "components": { ... } }. Item data such as potion contents is found under components, eg. get_nbt_tag(get_nbt_tag(compound_tag, 'components'), 'minecraft:potion_contents').

get_item_attributes Type [Up to 1.20.2]

Get the attributes (item ID, stack size, damage, tag) of an item target.

JSON Format:

{
  "type": "spells_and_shields:get_item_attributes",
  "activation": String,
  "t/source": String,
  "var/item": String,
  "var/amount": String,
  "var/damage": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The item target to get the attributes from.
  • var/item: The variable to store the item ID in.
  • var/amount: The variable to store the item amount (stack size) in.
  • var/damage: The variable to store the item damage in.
  • var/compound_tag: The variable to store the item's NBT Compound Tag in.

get_item_tag Type [Starting 1.21.1]

Get the item tag of an item target.

JSON Format:

{
  "type": "spells_and_shields:get_item_tag",
  "activation": String,
  "t/source": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The item target to get the tag from.
  • var/compound_tag: The variable to store the full item save NBT in. The structure is { "id": "...", "count": N, "components": { ... } }. Item data such as potion contents is found under components, eg. get_nbt_tag(get_nbt_tag(compound_tag, 'components'), 'minecraft:potion_contents').

get_item_tag Type [Up to 1.20.2]

Get the item tag of an item target.

JSON Format:

{
  "type": "spells_and_shields:get_item_tag",
  "activation": String,
  "t/source": String,
  "var/compound_tag": String
}

Elements:

  • t/source: The item target to get the tag from.
  • var/compound_tag: The variable to store the NBT Compound Tag in.

give_item Type

Give players items.

JSON Format:

{
  "type": "spells_and_shields:give_item",
  "activation": String,
  "ts/targets": String,
  "d/int/amount": Integer,
  "d/int/damage": Integer,
  "d/compound_tag/tag": Optional NBT Compound Tag,
  "d/string/item": String
}

Elements:

  • ts/targets: The player targets to give items to.
  • d/int/amount: The amount every player gets (stack size).
  • d/int/damage: The damage applied to every item.
  • d/compound_tag/tag: The tag applied to every item.
  • d/string/item: The item ID. IMPORTANT: The correct attribute key would be "d/string/item" but all implications of this key are already true (i.e. something like "item": "<<my_variable>> would work - dynamic values are permitted). This attribute will be fixed in the future.

item_check Type

Checks if a player has a specific item with a minimum stack size. If they do consume the required amount, otherwise disable the activation.

JSON Format:

{
  "type": "spells_and_shields:item_check",
  "activation": String,
  "t/target": String,
  "d/boolean/must_be_in_hand": Boolean,
  "item": Item Stack
}

Elements:

  • t/target: The player to check for the item.
  • d/boolean/must_be_in_hand: Set to true to only check items in hands, set to false to check the entire inventory.
  • item: The item to look for and consume. Count (stack size) matters.

item_equals Type

Check if a target item equals a set item. If they are not equal the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:item_equals",
  "activation": String,
  "t/target": String,
  "item": Item Stack,
  "d/boolean/ignore_tag": Boolean,
  "d/int/minimum_count": Integer,
  "d/int/minimum_durability": Integer
}

Elements:

  • t/target: The target item to check.
  • item: The item to compare it to. Durability and count (stack size) are ignored. Tag may be ignored depending on the next attribute.
  • d/boolean/ignore_tag: Set to true to ignore the items' NBT tags, set to false to include them in comparison (they have to be exactly equal).
  • d/int/minimum_count: The minimum required count. Set to -1 to ignore count.
  • d/int/minimum_durability: The minimum required durability. Set to -1 to ignore durability.

item_tag_check Type

Check whether or not a player has an item which is tagged with a specific tag and then consume said item. If no matching item was found the current activation is disabled. See: https://minecraft.fandom.com/wiki/Tag

JSON Format:

{
  "type": "spells_and_shields:item_tag_check",
  "activation": String,
  "t/target": String,
  "d/boolean/must_be_in_hand": Boolean,
  "item_tag": Item Tag,
  "d/boolean/count": Boolean
}

Elements:

  • t/target: The target player.
  • d/boolean/must_be_in_hand: Set to true to only check items in hands, set to false to check the entire inventory.
  • item_tag: The tag to check for.
  • d/boolean/count: The minimum required amount for matching items. This is also the amount that is consumed.

item_tag_equals Type

Check whether or not a target item is tagged with a specific item tag among other attributes. If not the current activation is disabled. See: https://minecraft.fandom.com/wiki/Tag

JSON Format:

{
  "type": "spells_and_shields:item_tag_equals",
  "activation": String,
  "t/target": String,
  "item_tag": Item Tag,
  "d/int/minimum_count": Integer,
  "d/int/minimum_durability": Integer
}

Elements:

  • t/target: The item target to check.
  • item_tag: The item tag said item must be tagged with.
  • d/int/minimum_count: The minimum required count (stack size). Set to -1 to ignore.
  • d/int/minimum_durability: The minimum required durability. Set to -1 to ignore.

mainhand_item_target Type

Get the item in the main hand of a target player as an item target.

JSON Format:

{
  "type": "spells_and_shields:mainhand_item_target",
  "activation": String,
  "t/source": String,
  "td/item": String
}

Elements:

  • t/source: The target player to get the item from their main hand.
  • td/item: The target group to put the item target in.

modify_item Type

Override certain attributes of a target item. A weaker alternative than the override_item action.

JSON Format:

{
  "type": "spells_and_shields:modify_item",
  "activation": String,
  "t/target": String,
  "d/int/amount": Integer,
  "d/int/damage": Integer,
  "d/compound_tag/tag": NBT Compound Tag
}

Elements:

  • t/target: The item target to modify.
  • d/int/amount: The new amount to set. Set to -1 to keep the current amount.
  • d/int/damage: The new damage to set (not durability). Set to -1 to keep the current damage.
  • d/compound_tag/tag: The new item tag to set.

offhand_item_target Type

Get the item in the offhand of a target player as an item target.

JSON Format:

{
  "type": "spells_and_shields:offhand_item_target",
  "activation": String,
  "t/source": String,
  "td/item": String
}

Elements:

  • t/source: The target player to get the item from their offhand.
  • td/item: The target group to put the item target in.

override_item Type

Override a target item. A stronger alternative than the modify_item action.

JSON Format:

{
  "type": "spells_and_shields:override_item",
  "activation": String,
  "t/target": String,
  "d/int/amount": Integer,
  "d/int/damage": Integer,
  "d/compound_tag/tag": NBT Compound Tag,
  "d/string/item": String
}

Elements:

  • t/target: The item target to override.
  • d/int/amount: The new amount to set. Set to -1 to keep the current amount.
  • d/int/damage: The new damage to set (not durability). Set to -1 to keep the current damage.
  • d/compound_tag/tag: The new item tag to set.
  • d/string/item: The new item ID.

player_has_items Type

Check if a player has a certain amount of items. If not the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:player_has_items",
  "activation": String,
  "t/source": String,
  "d/string/item": String,
  "d/int/amount": Integer,
  "d/compound_tag/tag": Optional NBT Compound Tag,
  "d/boolean/must_be_in_hand": Boolean,
  "d/boolean/creative_bypass": Boolean
}

Elements:

  • t/source: The target player.
  • d/string/item: The item ID the player must have.
  • d/int/amount: The minimum amount required.
  • d/compound_tag/tag: The NBT Compound Tag required on the item. If this is left out the NBT tag of possible item stacks will be ignored and they will simply be compared based on item ID.
  • d/boolean/must_be_in_hand: Set to true to only check items in the player's hands, set to false to check the entire inventory.
  • d/boolean/creative_bypass: Set to true to always have this check pass if the player is in creative mode, set to false to still do this check even if the player is in creative mode.

player_item_targets Type

Turn the entire inventory of a player into item targets.

JSON Format:

{
  "type": "spells_and_shields:player_item_targets",
  "activation": String,
  "t/source": String,
  "td/items": String,
  "d/boolean/include_hands": Boolean,
  "d/boolean/include_inventory": Boolean,
  "d/boolean/include_armor": Boolean
}

Elements:

  • t/source: The target player.
  • td/items: The target group to deposit all new item targets in.
  • d/boolean/include_hands: Set to true to create item targets out of both items in the player's hands, set to false to ignore items in the player's hands.
  • d/boolean/include_inventory: Set to true to create item targets out of all items in the player's inventory (excluding both hands and all armor slots), set to false to ignore items in the player's inventory.
  • d/boolean/include_armor: Set to true to create item targets out of all items in the player's armor slots, set to false to ignore items in the player's armor slots.

try_consume_item Type

Try to reduce the stack size of a target item by a certain amount if the quantity of the item is enough. If the quantity is not enough the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:try_consume_item",
  "activation": String,
  "t/target": String,
  "d/int/amount": Integer
}

Elements:

  • t/target: The target item.
  • d/int/amount: The amount to try and reduce it by.

try_damage_item Type

Try to damage a target item by a certain amount if the DURABILITY of the item is enough. If the durability is not enough the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:try_damage_item",
  "activation": String,
  "t/target": String,
  "d/int/damage": Integer
}

Elements:

  • t/target: The target item.
  • d/int/damage: The amount to try and damage it by.

use_item Type

This action simulates a player holding an item and right-clicking it. The player is artificially set to creative mode only for the duration of this single action to mitigate any side effects (this is essentially invisible for the player, they do not get a message or anything like that).

JSON Format:

{
  "type": "spells_and_shields:use_item",
  "activation": String,
  "t/source": String,
  "item": Item,
  "boolean/offhand": Boolean
}

Elements:

  • t/source: The player.
  • item: The item to activate.
  • boolean/offhand: Set to true to activate the item in the player's offhand, set to false to activate it in the main hand.

use_item_on_block Type

This action simulates a player holding an item and right-clicking a block (or multiple blocks) with it. The player is artificially set to creative mode only for the duration of this single action to mitigate any side effects (this is essentially invisible for the player, they do not get a message or anything like that).

JSON Format:

{
  "type": "spells_and_shields:use_item_on_block",
  "activation": String,
  "t/source": String,
  "ts/blocks": String,
  "item": Item,
  "boolean/offhand": Boolean,
  "direction": Direction
}

Elements:

  • t/source: The player.
  • ts/blocks: The block(s) to use the item on.
  • item: The item to activate.
  • boolean/offhand: Set to true to activate the item in the player's offhand, set to false to activate it in the main hand.
  • direction: The face of the block the player clicks.

Level (World) Actions


cube_block_targets Type

Define a cube of blocks and get every single block position as a seperate target in a target group.

JSON Format:

{
  "type": "spells_and_shields:cube_block_targets",
  "activation": String,
  "t/source": String,
  "td/targets": String,
  "d/vec3/corner1": Vec3,
  "d/vec3/corner2": Vec3
}

Elements:

  • t/source: The source position to build the cube from.
  • td/targets: The target group to put the new position targets into.
  • d/vec3/corner1: The offset of the first corner from the source position.
  • d/vec3/corner2: The offset of the second corner from the source position.

get_block Type

Get information about the block state at a certain position.

JSON Format:

{
  "type": "spells_and_shields:get_block",
  "activation": String,
  "t/target": String,
  "var/block": String,
  "var/block_state": String,
  "var/is_air": String
}

Elements:

  • t/target: The position target where the block state is to be queried.
  • var/block: The variable to store the block ID in (a string is stored).
  • var/block_state: The variable to store the block state in (stored as NBT compound tag).
  • var/is_air: The variable to store true in if there is no block at the given position, false if there is any block at that position.

get_block_attributes Type

Get general information about a block at a certain position.

JSON Format:

{
  "type": "spells_and_shields:get_block_attributes",
  "activation": String,
  "t/target": String,
  "var/is_air": String,
  "var/is_fluid": String,
  "var/has_collider": String
}

Elements:

  • t/target: The position target to get information from.
  • var/is_air: The variable to store true in if there is no block at the given position, false if there is any block at that position.
  • var/is_fluid: The variable to store true in if there is any fluid at the given position (includes the block being water-logged), false if there is no fluid at that position.
  • var/has_collider: The variable to store true in if the block at the given position can be physically collided with, false if you can fully walk or fall through the block.

get_fluid Type

Get information about the fluid state at a certain position.

JSON Format:

{
  "type": "spells_and_shields:get_fluid",
  "activation": String,
  "t/target": String,
  `var/fluid`: String,
  `var/fluid_state`: String,
  "var/is_fluid": String,
  "var/is_source": String
}

Elements:

  • t/target: The position target where the fluid state is to be queried.
  • var/fluid: The variable to store the fluid ID in (a string is stored).
  • var/fluid_state: The variable to store the fluid state in (stored as NBT compound tag).
  • var/is_fluid: The variable to store true in if there is any fluid at the given position (includes the block being water-logged), false if there is no fluid at that position.
  • var/is_source: The variable to store true in if there is any fluid at the given position and the fluid is a source (includes the block being water-logged), false otherwise.

offset_block Type

Make new position targets out of given targets by adding an offset to each (the original targets are not moved themselves, only new targets are generated).

JSON Format:

{
  "type": "spells_and_shields:offset_block",
  "activation": String,
  "ts/targets": String,
  "td/result": String,
  "d/vec3/offset": Vector
}

Elements:

  • ts/targets: The targets to offset from.
  • td/result: The target group to store the new position targets in.
  • d/vec3/offset: The offset to apply to each target.

player_harvest_block Type

Simulate a player breaking blocks. Drops items as if the player broke the blocks with their currently held tool, respecting tool tier, fortune, silk touch, etc.

JSON Format:

{
  "type": "spells_and_shields:player_harvest_block",
  "activation": String,
  "t/source": String,
  "ts/blocks": String,
  "direction": Direction
}

Elements:

  • t/source: The player that harvests the blocks.
  • ts/blocks: The block targets to harvest.
  • direction: The face direction from which the player appears to break the block.

position_to_target Type

Create a position target from a Vec3 value and store it in a target group. Useful when you have a coordinate as a variable but need it as a position target for other actions.

JSON Format:

{
  "type": "spells_and_shields:position_to_target",
  "activation": String,
  "td/result": String,
  "d/vec3/position": Vector
}

Elements:

  • td/result: The target group to store the new position target in.
  • d/vec3/position: The position vector.

remove_block Type

Remove the blocks at the given positions, replacing them with air without dropping any items.

JSON Format:

{
  "type": "spells_and_shields:remove_block",
  "activation": String,
  "ts/targets": String
}

Elements:

  • ts/targets: The position targets of the blocks to remove.

set_block Type

Place a block at the given positions with a specific block state.

JSON Format:

{
  "type": "spells_and_shields:set_block",
  "activation": String,
  "ts/targets": String,
  "d/string/block": String,
  "d/compound_tag/block_state": NBT Compound Tag
}

Elements:

  • ts/targets: The position targets to place the block at.
  • d/string/block: The block ID.
  • d/compound_tag/block_state: The block state properties as an NBT Compound Tag (eg. {"age": "0"}). Use an empty tag {} for the default block state.

tick_block Type

Schedule a game tick for blocks at the given positions after a set delay. The block's own tick logic runs when the scheduled tick fires (eg. frosted ice melting, crop growth).

JSON Format:

{
  "type": "spells_and_shields:tick_block",
  "activation": String,
  "ts/targets": String,
  "d/int/duration": Integer
}

Elements:

  • ts/targets: The position targets of the blocks to schedule a tick for.
  • d/int/duration: The delay in ticks before the scheduled tick fires.

Mana Actions


burn_mana Type

Burn (= reduce) mana of target entities. If they have less mana than the set amount their mana is set to 0.

JSON Format:

{
  "type": "spells_and_shields:burn_mana",
  "activation": String,
  "ts/targets": String,
  "d/double/mana_amount": Double
}

Elements:

  • ts/targets: The target living entities that get mana burn.
  • d/double/mana_amount: The amount of mana burnt.

get_mana Type

Get the mana of a target and store it as variable.

JSON Format:

{
  "type": "spells_and_shields:get_mana",
  "activation": String,
  "t/target": String,
  "var/result": String
}

Elements:

  • t/target: The target living entity to get the current mana value from.
  • var/result: The variable to store the mana value in.

has_mana Type

Check if a target has a set minimum amount of mana. If their mana is currently less than the set amount the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:has_mana",
  "activation": String,
  "t/target": String,
  "d/double/amount": Double
}

Elements:

  • t/target: The target living entity to check the mana of.
  • d/double/amount: The minimum required mana.

mana_check Type

Check if a target has a set minimum amount of mana and burn it. If their mana is currently less than the set amount the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:mana_check",
  "activation": String,
  "t/target": String,
  "d/double/amount": Double
}

Elements:

  • t/target: The target living entity to check the mana of.
  • d/double/amount: The mana required and burnt.

replenish_mana Type

Restore mana for living entities. The result can not exceed their maximum mana value and is capped there.

JSON Format:

{
  "type": "spells_and_shields:replenish_mana",
  "activation": String,
  "ts/targets": String,
  "d/double/mana_amount": Double
}

Elements:

  • ts/targets: The living entity targets to restore mana for.
  • d/double/mana_amount: The amount of mana restored.

simple_mana_check Type

Check if the owner target (i.e. the player who activated the spell) has the amount of mana set in the spell file and burn it. If their mana is currently less than said amount the current activation is disabled.

JSON Format:

{
  "type": "spells_and_shields:simple_mana_check",
  "activation": String
}

Server Actions


execute_command Type

Executes a command from server console.

JSON Format:

{
  "type": "spells_and_shields:execute_command",
  "activation": String,
  "d/string/command": String
}

Elements:

  • d/string/command: The command to execute.

execute_player_command Type

Executes a command from the perspective of a player.

JSON Format:

{
  "type": "spells_and_shields:execute_player_command",
  "activation": String,
  "ts/targets": String,
  "d/string/command": String,
  "int/permission_level": Optional Integer
}

Elements:

  • ts/targets: The players to execute the commands from.
  • d/string/command: The command to execute for each player.
  • int/permission_level: The permission level for command execution. Default is 4; set this to -1 to use the player's permission level for command execution (i.e. there is a difference whether or not the player is an OP).

Target Actions


clear_targets Type

Clear a target group (remove all targets from it).

JSON Format:

{
  "type": "spells_and_shields:clear_targets",
  "activation": String,
  "td/destination": String
}

Elements:

  • td/destination: The target group to clear.

copy_targets Type

Copy all targets from one target group to another.

JSON Format:

{
  "type": "spells_and_shields:copy_targets",
  "activation": String,
  "td/destination": String,
  "ts/source": String
}

Elements:

  • td/destination: The target group to copy the targets to.
  • ts/source: The target group where the targets are copied from.

entity_uuid_target Type

Find an entity target based on UUID.

JSON Format:

{
  "type": "spells_and_shields:entity_uuid_target",
  "activation": String,
  "td/destination": String,
  "d/string/uuid": String
}

Elements:

  • td/destination: The target group to put the entity in if such an entity was found.
  • d/string/uuid: The UUID of the entity to find and target.

get_target_group_size Type

Get the size of a target group as variable.

JSON Format:

{
  "type": "spells_and_shields:get_target_group_size",
  "activation": String,
  "td/source": String,
  "var/result": String
}

Elements:

  • td/source: The target group to get the size of.
  • var/result: The variable that then represents this value.

home Type

Shoot homing projectiles from a position at targets.

JSON Format:

{
  "type": "spells_and_shields:home",
  "activation": String,
  "t/source": String,
  "ts/targets": String,
  "d/double/velocity": Double,
  "d/int/timeout": Integer,
  "ad/block_hit_activation": String,
  "ad/entity_hit_activation": String,
  "ad/timeout_activation": String,
  "td/projectile": String
}

Elements:

  • t/source: The source position where the projectiles are shot from.
  • ts/targets: The entity targets to shoot at. One homing projectile will be spawned for each of these targets.
  • d/double/velocity: The velocity (speed) of the projectiles.
  • d/int/timeout: The timeout (in ticks) of the projectiles.
  • ad/block_hit_activation: The event for when a projectile hits a block.
  • ad/entity_hit_activation: The event for when a projectile hits an entity.
  • ad/timeout_activation: The event for when a projectile times out.
  • td/projectile: The target group the projectiles are put in directly after they are fired.

Notes:

  • When a projectile triggers an event, the following applies:
  • The projectile target group contains the projectile entity itself.
  • The block_hit target group contains the block position, if a block was hit (i.e. The activation set in block_hit_activation is run as event).
  • The entity_hit target group contains the entity, if an entity was hit (i.e. The activation set in entity_hit_activation is run as event).
  • The hit_position target group contains the exact position of the projectile when it hit something or when it times out.

look_at_target Type

Get a target an entity is looking at.

JSON Format:

{
  "type": "spells_and_shields:look_at_target",
  "activation": String,
  "t/source": String,
  "d/double/range": Double,
  "double/bb_inflation": Optional Double,
  "block_clip_context": Optional String,
  "fluid_clip_context": Optional String,
  "a/block_hit_activation": String,
  "a/entity_hit_activation": String,
  "a/miss_activation": String
}

Elements:

  • t/source: The source entity which looks at whatever target we are looking for.
  • d/double/range: The maximum range how far the target may be away.
  • double/bb_inflation: The absolute amount the bounding boxes (AABBs) of all entities are inflated in each direction (eg. 0.5 makes the possible target entity half a block bigger in each direction, so a total block bigger on each axis) to make them easier to look at.
  • block_clip_context: The block clip context (i.e. what property of a block decides whethere or not you are looking at it or if it is considered). The following values are accepted:
    • collider (default)
    • visual
    • outline
    • falldamage_resetting
  • fluid_clip_context: The fluid clip context (i.e. what property of a fluid block decides whether or not you are looking at it or if it is considered). The following values are accepted:
    • none (default)
    • source_only
    • any
    • water
  • a/block_hit_activation: The activation enabled if the source is looking at a block within range.
  • a/entity_hit_activation: The activation enabled if the source is looking at an entity within range.
  • a/miss_activation: The activation enabled if the source is not looking at anything within range.

Notes:

  • After executing this action, the following applies:
  • The block_hit target group contains the block position, if a block was looked at (i.e. The activation set in block_hit_activation is enabled).
  • The entity_hit target group contains the entity, if an entity was looked at (i.e. The activation set in entity_hit_activation is enabled).
  • The hit_position target group contains the exact position the source was looking at or the max range air block if nothing was within range.

move_player_targets Type

Move all targets that are players from one target group to another.

JSON Format:

{
  "type": "spells_and_shields:move_player_targets",
  "activation": String,
  "td/destination": String,
  "ts/source": String
}

Elements:

  • td/destination: The target group to move the player targets to.
  • ts/source: The target group to remove the player targets from.

pick_target Type

Pick a single target out of a target group.

JSON Format:

{
  "type": "spells_and_shields:pick_target",
  "activation": String,
  "td/destination": String,
  "ts/source": String,
  "boolean/remove": Boolean,
  "boolean/random": Boolean
}

Elements:

  • td/destination: The target group to put the picked target into.
  • ts/source: The target group to pick a target from.
  • boolean/remove: If this is true the picked target is removed from the source target group, otherwise it stays in it.
  • boolean/random: If this is true the picked target is randomly selected from the source target group, otherwise the first one in the list is picked.

ranged_entity_targets Type

Target all entities in range of a specified position.

JSON Format:

{
  "type": "spells_and_shields:ranged_entity_targets",
  "activation": String,
  "td/destination": String,
  "ts/source": String,
  "d/double/range": Double
}

Elements:

  • td/destination: The target group to put the entities in.
  • ts/source: The source position the entities have to be in range of to be targeted. If this is an entity it is also added to the target group.
  • d/double/range: The range the entities have to be within to be targeted.

shoot Type

Make an entity shoot a projectile forward.

JSON Format:

{
  "type": "spells_and_shields:shoot",
  "activation": String,
  "t/source": String,
  "d/double/velocity": Double,
  "d/double/inaccuracy": Double,
  "d/int/timeout": Integer,
  "ad/block_hit_activation": String,
  "ad/entity_hit_activation": String,
  "ad/timeout_activation": String,
  "td/projectile": String
}

Elements:

  • t/source: The source entity that shoots the projectile.
  • d/double/velocity: The velocity (speed) of the projectile.
  • d/double/inaccuracy: The inaccuracy when shooting, 0 is perfect accuracy.
  • d/int/timeout: The timeout (in ticks) of the projectile.
  • ad/block_hit_activation: The event for when the projectile hits a block.
  • ad/entity_hit_activation: The event for when the projectile hits an entity.
  • ad/timeout_activation: The event for when the projectile times out.
  • td/projectile: The target group the projectile is put in directly after it is fired.

Notes:

  • When the projectile triggers an event, the following applies:
  • The projectile target group contains the projectile entity itself.
  • The block_hit target group contains the block position, if a block was hit (i.e. The activation set in block_hit_activation is run as event).
  • The entity_hit target group contains the entity, if an entity was hit (i.e. The activation set in entity_hit_activation is run as event).
  • The hit_position target group contains the exact position of the projectile when it hit something or when it times out.

shoot_alt Type

Shoot projectiles from target positions in a set direction.

JSON Format:

{
  "type": "spells_and_shields:shoot_alt",
  "activation": String,
  "t/source": String,
  "d/double/velocity": Double,
  "d/double/inaccuracy": Double,
  "d/int/timeout": Integer,
  "ad/block_hit_activation": String,
  "ad/entity_hit_activation": String,
  "ad/timeout_activation": String,
  "td/projectile": String,
  "t/shooter": Optional String
}

Elements:

  • t/source: The source position the projectile is shot from.
  • d/vec3/velocity: The velocity vector (direction and speed) of the projectile.
  • d/double/inaccuracy: The inaccuracy when shooting, 0 is perfect accuracy.
  • d/int/timeout: The timeout (in ticks) of the projectile.
  • ad/block_hit_activation: The event for when the projectile hits a block.
  • ad/entity_hit_activation: The event for when the projectile hits an entity.
  • ad/timeout_activation: The event for when the projectile times out.
  • td/projectile: The target group the projectile is put in directly after it is fired.
  • t/shooter: The entity responsible for this projectile. Used to eg. give credit for kills. This may be left out.

Notes:

  • When the projectile triggers an event, the following applies:
  • The projectile target group contains the projectile entity itself.
  • The block_hit target group contains the block position, if a block was hit (i.e. The activation set in block_hit_activation is run as event).
  • The entity_hit target group contains the entity, if an entity was hit (i.e. The activation set in entity_hit_activation is run as event).
  • The hit_position target group contains the exact position of the projectile when it hit something or when it times out.

Variable Actions


put_int Type

Store an integer value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_int",
  "activation": String,
  "d/int/source": Integer,
  "var/result": String
}

Elements:

  • d/int/source: The integer value to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

put_double Type

Store a double value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_double",
  "activation": String,
  "d/double/source": Double,
  "var/result": String
}

Elements:

  • d/double/source: The double value to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

put_vec3 Type

Store a Vec3 value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_vec3",
  "activation": String,
  "d/vec3/source": Vector,
  "var/result": String
}

Elements:

  • d/vec3/source: The Vec3 value to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

put_boolean Type

Store a boolean value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_boolean",
  "activation": String,
  "d/boolean/source": Boolean,
  "var/result": String
}

Elements:

  • d/boolean/source: The boolean value to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

put_tag Type

Store an NBT Compound Tag value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_tag",
  "activation": String,
  "d/tag/source": NBT Compound Tag,
  "var/result": String
}

Elements:

  • d/tag/source: The NBT Compound Tag to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

put_string Type

Store a string value in a variable.

JSON Format:

{
  "type": "spells_and_shields:put_string",
  "activation": String,
  "d/string/source": String,
  "var/result": String
}

Elements:

  • d/string/source: The string value to store (supports dynamic expressions).
  • var/result: The variable to store the value in.

Variable / Mapped Unary Functions Actions


negate Type

Negate a numeric value (multiply by -1). Positive values become negative and vice versa.

JSON Format:

{
  "type": "spells_and_shields:negate",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the numeric value to negate.
  • var/result: The variable to store the result in.

not Type

Boolean NOT. Flips true to false and false to true.

JSON Format:

{
  "type": "spells_and_shields:not",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the boolean value.
  • var/result: The variable to store the result in.

round Type

Round a double to the nearest integer.

JSON Format:

{
  "type": "spells_and_shields:round",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value.
  • var/result: The variable to store the resulting integer in.

floor Type

Round a double down to the nearest integer (floor).

JSON Format:

{
  "type": "spells_and_shields:floor",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value.
  • var/result: The variable to store the resulting integer in.

ceil Type

Round a double up to the nearest integer (ceiling).

JSON Format:

{
  "type": "spells_and_shields:ceil",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value.
  • var/result: The variable to store the resulting integer in.

sqrt Type

Compute the square root of a double.

JSON Format:

{
  "type": "spells_and_shields:sqrt",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value.
  • var/result: The variable to store the result (double) in.

get_x Type

Get the X component of a Vec3.

JSON Format:

{
  "type": "spells_and_shields:get_x",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the Vec3.
  • var/result: The variable to store the X value (double) in.

get_y Type

Get the Y component of a Vec3.

JSON Format:

{
  "type": "spells_and_shields:get_y",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the Vec3.
  • var/result: The variable to store the Y value (double) in.

get_z Type

Get the Z component of a Vec3.

JSON Format:

{
  "type": "spells_and_shields:get_z",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the Vec3.
  • var/result: The variable to store the Z value (double) in.

length Type

Get the length (magnitude) of a Vec3.

JSON Format:

{
  "type": "spells_and_shields:length",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the Vec3.
  • var/result: The variable to store the length (double) in.

normalized Type

Normalize a Vec3 to a unit vector (length 1) in the same direction.

JSON Format:

{
  "type": "spells_and_shields:normalized",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the Vec3 to normalize.
  • var/result: The variable to store the normalized Vec3 in.

sin Type

Compute the sine of an angle in radians.

JSON Format:

{
  "type": "spells_and_shields:sin",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the angle in radians (double).
  • var/result: The variable to store the result (double) in.

cos Type

Compute the cosine of an angle in radians.

JSON Format:

{
  "type": "spells_and_shields:cos",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the angle in radians (double).
  • var/result: The variable to store the result (double) in.

asin Type

Compute the arc sine (inverse sine). Returns an angle in radians.

JSON Format:

{
  "type": "spells_and_shields:asin",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value (must be in range [-1, 1]).
  • var/result: The variable to store the angle in radians (double) in.

acos Type

Compute the arc cosine (inverse cosine). Returns an angle in radians.

JSON Format:

{
  "type": "spells_and_shields:acos",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the double value (must be in range [-1, 1]).
  • var/result: The variable to store the angle in radians (double) in.

to_radians Type

Convert an angle from degrees to radians.

JSON Format:

{
  "type": "spells_and_shields:to_radians",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the angle in degrees (double).
  • var/result: The variable to store the result in radians (double) in.

to_degrees Type

Convert an angle from radians to degrees.

JSON Format:

{
  "type": "spells_and_shields:to_degrees",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the angle in radians (double).
  • var/result: The variable to store the result in degrees (double) in.

uuid_from_string Type

Generate a deterministic UUID from a string. The same input always produces the same UUID. Useful for stable modifier or delayed spell identifiers.

JSON Format:

{
  "type": "spells_and_shields:uuid_from_string",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the input string.
  • var/result: The variable to store the resulting UUID string in.

next_int Type

Generate a random integer in the range [0, operant).

JSON Format:

{
  "type": "spells_and_shields:next_int",
  "activation": String,
  "var/operant": String,
  "var/result": String
}

Elements:

  • var/operant: The variable holding the exclusive upper bound (integer). A value of n produces a result in [0, n-1].
  • var/result: The variable to store the random integer in.

Variable / Mapped Binary Functions Actions


add Type

Add two numbers or vectors. Works for int + int, double + double, and Vec3 + Vec3.

JSON Format:

{
  "type": "spells_and_shields:add",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first value.
  • var/operant_2: The second value.
  • var/result: The variable to store operant_1 + operant_2 in.

sub Type

Subtract two numbers or vectors. Works for int, double, and Vec3.

JSON Format:

{
  "type": "spells_and_shields:sub",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The value to subtract from.
  • var/operant_2: The value to subtract.
  • var/result: The variable to store operant_1 - operant_2 in.

mul Type

Multiply two values. Works for int * int, double * double, and scalar * Vec3 (or Vec3 * scalar).

JSON Format:

{
  "type": "spells_and_shields:mul",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first value.
  • var/operant_2: The second value.
  • var/result: The variable to store operant_1 * operant_2 in.

div Type

Divide two numbers. Works for int and double.

JSON Format:

{
  "type": "spells_and_shields:div",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The dividend.
  • var/operant_2: The divisor.
  • var/result: The variable to store operant_1 / operant_2 in.

rem Type

Remainder (modulo) of two integers.

JSON Format:

{
  "type": "spells_and_shields:rem",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The dividend.
  • var/operant_2: The divisor.
  • var/result: The variable to store operant_1 % operant_2 (integer) in.

eq Type

Check equality of two values. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:eq",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first value.
  • var/operant_2: The second value.
  • var/result: The variable to store the result (true if equal) in.

neq Type

Check inequality of two values. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:neq",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first value.
  • var/operant_2: The second value.
  • var/result: The variable to store the result (true if not equal) in.

gt Type

Greater-than comparison. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:gt",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The left-hand numeric value.
  • var/operant_2: The right-hand numeric value.
  • var/result: The variable to store the result (true if operant_1 > operant_2) in.

geq Type

Greater-than-or-equal comparison. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:geq",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The left-hand numeric value.
  • var/operant_2: The right-hand numeric value.
  • var/result: The variable to store the result (true if operant_1 >= operant_2) in.

lt Type

Less-than comparison. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:lt",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The left-hand numeric value.
  • var/operant_2: The right-hand numeric value.
  • var/result: The variable to store the result (true if operant_1 < operant_2) in.

leq Type

Less-than-or-equal comparison. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:leq",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The left-hand numeric value.
  • var/operant_2: The right-hand numeric value.
  • var/result: The variable to store the result (true if operant_1 <= operant_2) in.

min Type

Return the smaller of two numeric values.

JSON Format:

{
  "type": "spells_and_shields:min",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first numeric value.
  • var/operant_2: The second numeric value.
  • var/result: The variable to store the minimum in.

max Type

Return the larger of two numeric values.

JSON Format:

{
  "type": "spells_and_shields:max",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The first numeric value.
  • var/operant_2: The second numeric value.
  • var/result: The variable to store the maximum in.

move_x Type

Offset the X component of a Vec3 by a value.

JSON Format:

{
  "type": "spells_and_shields:move_x",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The Vec3 to offset.
  • var/operant_2: The amount to add to the X component (double).
  • var/result: The variable to store the resulting Vec3 in.

move_y Type

Offset the Y component of a Vec3 by a value.

JSON Format:

{
  "type": "spells_and_shields:move_y",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The Vec3 to offset.
  • var/operant_2: The amount to add to the Y component (double).
  • var/result: The variable to store the resulting Vec3 in.

move_z Type

Offset the Z component of a Vec3 by a value.

JSON Format:

{
  "type": "spells_and_shields:move_z",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The Vec3 to offset.
  • var/operant_2: The amount to add to the Z component (double).
  • var/result: The variable to store the resulting Vec3 in.

nbt_contains Type

Check whether a CompoundTag contains a given key. Produces a boolean.

JSON Format:

{
  "type": "spells_and_shields:nbt_contains",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to check.
  • var/operant_2: The key to look up (string).
  • var/result: The variable to store the result (true if the key exists) in.

get_nbt_int Type

Read an integer value from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_int",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the integer value in.

get_nbt_double Type

Read a double value from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_double",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the double value in.

get_nbt_boolean Type

Read a boolean value from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_boolean",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the boolean value in.

get_nbt_tag Type

Read a nested CompoundTag from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_tag",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the nested CompoundTag in.

get_nbt_string Type

Read a string value from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_string",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the string value in.

get_nbt_uuid Type

Read a UUID from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_uuid",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the UUID (as string) in.

get_nbt_vec3 Type

Read a Vec3 from a CompoundTag by key.

JSON Format:

{
  "type": "spells_and_shields:get_nbt_vec3",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to read from.
  • var/operant_2: The key (string).
  • var/result: The variable to store the Vec3 in.

Variable / Mapped Ternary Functions Actions


conditional Type

Ternary conditional. Returns one of two values depending on a boolean condition.

JSON Format:

{
  "type": "spells_and_shields:conditional",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The boolean condition.
  • var/operant_2: The value to return if the condition is true.
  • var/operant_3: The value to return if the condition is false.
  • var/result: The variable to store the chosen value in.

vec3 Type

Construct a Vec3 from three double components.

JSON Format:

{
  "type": "spells_and_shields:vec3",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The X component (double).
  • var/operant_2: The Y component (double).
  • var/operant_3: The Z component (double).
  • var/result: The variable to store the resulting Vec3 in.

block_pos Type

Construct a Vec3 representing a block position from three integer coordinates.

JSON Format:

{
  "type": "spells_and_shields:block_pos",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The X block coordinate (integer).
  • var/operant_2: The Y block coordinate (integer).
  • var/operant_3: The Z block coordinate (integer).
  • var/result: The variable to store the resulting Vec3 in.

put_nbt_int Type

Write an integer value into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_int",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The integer value to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_double Type

Write a double value into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_double",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The double value to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_boolean Type

Write a boolean value into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_boolean",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The boolean value to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_tag Type

Write a nested CompoundTag into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_tag",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The CompoundTag value to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_string Type

Write a string value into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_string",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The string value to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_uuid Type

Write a UUID into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_uuid",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The UUID (as string) to write.
  • var/result: The variable to store the modified CompoundTag in.

put_nbt_vec3 Type

Write a Vec3 into a CompoundTag at a given key. Returns the modified tag.

JSON Format:

{
  "type": "spells_and_shields:put_nbt_vec3",
  "activation": String,
  "var/operant_1": String,
  "var/operant_2": String,
  "var/operant_3": String,
  "var/result": String
}

Elements:

  • var/operant_1: The CompoundTag to write into.
  • var/operant_2: The key (string).
  • var/operant_3: The Vec3 value to write.
  • var/result: The variable to store the modified CompoundTag in.

Clone this wiki locally