Magical Scepter

Spell Context

Spells are cast with a context that can be modified with spell transformers.

  • {}: Root object.
    • {} position: Position to apply spell effects at, by default caster position.
      • "" type: Position type specified by id.
      • + Additional fields based on position type.
    • {} rotation: Rotation to apply spell effects with, by default caster facing.
      • "" type: Rotation type specified by id.
      • + Additional fields based on rotation type.
    • {} target: Living entity to apply spell effects to, by default the caster.
      • "" type: Target type specified by id.
      • + Additional fields based on target type.

Position

Absolute

Position based on absolute coordinates.

  • {}: Root object.
    • D x: Absolute x coordinate to set.
    • D y: Absolute y coordinate to set.
    • D z: Absolute z coordinate to set.
Example JSON
{
"type": "magicalscepter:absolute",
"x": -390.0,
"y": 64.0,
"z": 220.0
}

Entity

Position based on context entity position.

  • {}: Root object.
    • "" anchor: Position anchor, either eyes or feet.
Example JSON
{
"type": "magicalscepter:entity",
"anchor": "eyes"
}

Mixed

Position based on a mix of positions.

  • {}: Root object.
    • {} x: Position to set x coordinate with.
    • {} y: Position to set y coordinate with.
    • {} z: Position to set z coordinate with.
Example JSON
{
"type": "magicalscepter:mixed",
"x": {
"type": "magicalscepter:relative",
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"y": {
"type": "magicalscepter:entity",
"anchor": "eyes"
},
"z": {
"type": "magicalscepter:relative",
"x": 0.0,
"y": 0.0,
"z": 1.0
}
}

Random

Position based on random relative coordinates.

  • {}: Root object.
    • D dx: Delta x coordinate to randomly set.
    • D dy: Delta y coordinate to randomly set.
    • D dz: Delta z coordinate to randomly set.
    • {} position: Optional position to use.
    • {} rotation: Optional rotation to use.
Example JSON
{
"type": "magicalscepter:random",
"x": 4.0,
"y": 4.0,
"z": 4.0
}

Relative

Position based on relative coordinates.

  • {}: Root object.
    • D x: Relative x coordinate to set.
    • D y: Relative y coordinate to set.
    • D z: Relative z coordinate to set.
    • {} position: Optional position to use.
    • {} rotation: Optional rotation to use.
Example JSON
{
"type": "magicalscepter:relative",
"x": 0.0,
"y": 0.0,
"z": 20.0
}

Rotation

Absolute

Rotation based on absolute angles.

  • {}: Root object.
    • F pitch: Absolute pitch angle to set, default is 0.
    • F yaw: Absolute yaw angle to set, default is 0.
Example JSON
{
"type": "magicalscepter:absolute",
"yaw": 180,
"pitch": 45,
}

Entity

Rotation based on entity rotation.

  • {}: Root object.
    • F pitch: Relative pitch angle to add, default is 0.
    • F yaw: Relative yaw angle to add, default is 0.
Example JSON
{
"type": "magicalscepter:entity"
}

facing

Rotation to face a position.

  • {}: Root object.
    • {} position: Position to rotate towards.
Example JSON
{
"type": "magicalscepter:facing",
"position": {
"type": "magicalscepter:entity"
}
}

Mixed

Rotation based on mixed angles.

  • {}: Root object.
    • {} pitch: Rotation to set pitch angle with, default is keep current angle.
    • {} yaw: Rotation to set yaw angle with, default is keep current angle.
Example JSON
{
"type": "magicalscepter:mixed",
"pitch": {
"type": "magicalscepter:entity"
}
}

Random

Rotation based on random angles.

  • {}: Root object.
    • F pitch: Delta pitch angle to randomly set, default is 180.
    • F yaw: Delta yaw angle to randomly set. default is 360.
Example JSON
{
"type": "magicalscepter:random",
"yaw": 30,
"pitch": 10,
}

Relative

Rotation based on relative angles.

  • {}: Root object.
    • F pitch: Relative pitch angle to set, default is 0.
    • F yaw: Relative Delta yaw angle to set. default is 0.
Example JSON
{
"type": "magicalscepter:relative",
"yaw": 30,
"pitch": -10,
}

Target

Absolute

Target based on UUID.

  • {}: Root object.
    • "" target: UUID to set target with.
Example JSON
{
"type": "magicalscepter:target",
"target": "19fc9957f9a845089140f7491fcdbba4",
}