Skip to content
JasperLorelai edited this page May 19, 2024 · 19 revisions

Source Code

spell-class: ".buff.MinionSpell"

Targeting:

This spell can only be cast by/on players.

Description:

A buff spell that summons a minion bound to the player. The caster can target the minion with spells marked with beneficial: true.

Buff Uses:

Buff spell Uses increment whenever the minion changes targets or deals damage.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
mob-chances A list of the possible entity types and a chance to spawn them, in the format type chance:
- type must be an Entity Type
- chance must be an integer from 0 to 100
String List [zombie 100] false
potion-effects A list of potion effects to apply to the summoned minion. Follows the format: potionType duration strength ambient.
- potionType should be a potion effect type
- duration should be an integer for server ticks duration. It is optional with a default value of 600 ticks.
- strength should be an integer. It is optional with a default value of 0.
- ambient is for ambient particles and it is also optional. To enable it you write ambient at that parameter position, omit it to disable it.
String List false
attributes Attribute list to apply to the summoned minion. String List false
main-hand The Magic Item to be held in the minion's main hand. String false
off-hand The Magic Item to be held in the minion's off-hand. String false
helmet The Magic Item armor piece to show up in the helmet slot. String false
chestplate The Magic Item armor piece to show up in the chestplate slot. String false
leggings The Magic Item armor piece to show up in the leggings slot. String false
boots The Magic Item armor piece to show up in the boots slot. String false
minion-targets Target list String List false
main-hand-drop-chance The chance to drop the item in the minion's main hand. Float 0 false
off-hand-drop-chance The chance to drop the item in the minion's off-hand. Float 0 false
helmet-drop-chance The chance to drop the minion's helmet. Float 0 false
chestplate-drop-chance The chance to drop the minion's chestplate. Float 0 false
leggings-drop-chance The chance to drop the minion's leggings. Float 0 false
boots-drop-chance The chance to drop the minion's boots. Float 0 false
spell-on-spawn Sub-spell to cast when the minion spawns. This is achieved, code-wise, by having the caster cast a spell at the minion's location. The minion itself is not the one casting the spell. Must be able to target location or the mob itself. String false
spell-on-attack Sub-spell to cast when the minion lands a hit. This is achieved, code-wise, by having the caster cast a spell at the minion's target. The minion itself is not the one casting the spell. String false
spell-on-death Sub-spell to cast when the minion dies. This is achieved, code-wise, by having the caster cast a spell at the minion's location. The minion itself is not the one casting the spell. Must be able to target location. String false
spawn-offset The offset to use when spawning a minion. Vector "1,0,0" true
follow-range The distance the minion should try to be from the caster. Double 1.5 false
follow-speed The speed at which the minion will run to the caster when it reaches max-distance. Double 1 false
max-distance The maximum distance the minion can be from the caster before running to them. Double 30 false
power-affects-health Whether to let spell power influence the health option. Boolean true
power-health-factor The factor of which to change the mob's health based on spell power. Double 1 true
max-health The maximum health the minion is able to have. Double 20 true
health The beginning health of the mob on spawning. Double 20 true
minion-name The name of the minion. If defined, the nameplate will always display above the mob's head. Rich Text true
gravity Whether the minion should follow gravity. Boolean true true
baby Whether the minion should be a baby version of the mob being summoned. Boolean false true
prevent-sun-burn Whether to prevent the minions from taking burn damage in the sun. Boolean true false

Additional Placeholders:

  • minion-name:
    • %c: Returns the buff target's name.

Example:

HellKnight:
    spell-class: ".buff.MinionSpell"
    permission-name: necromancer
    duration: 60
    mob-chances: [Wither_Skeleton 100]
    minion-name: "&a%c's &cHell Knight"
    prevent-sun-burn: true
    follow-range: 25
    follow-speed: 1
    spell-on-spawn: MinionSpawnEffect
    max-health: 40
    health: 40
    max-distance: 25
    main-hand: stone_axe
    off-hand: shield
    helmet: 'diamond_helmet{color: "#000000", durability: 100, name: "&0Sacrificial Helmet"}'
    chestplate: 'diamond_chestplate{color: "#000000", durability: 100,  name: "&0Sacrificial Plate"}'
    leggings: 'diamond_leggings{color: "#000000", durability: 100, name: "&0Sacrificial Leggings"}'
    boots: 'diamond_boots{color: "#000000", durability: 100, name: "&0Sacrificial Boots"}'
    toggle: false
    minion-targets:
        - players
        - nonplayers
    attributes:
        - "knockback_resistance 5 addnumber"
        - "armor 4 addnumber"
    potion-effects: ["slowness 1200 1"]

MinionSpawnEffect:
    spell-class: ".targeted.DummySpell"
    helper-spell: true
    permission-name: necromancer
    effects:
        1:
            position: target
            effect: effectlib
            effectlib:
                class: AnimatedBallEffect
                particle: EXPLOSION_LARGE
                particles: 10
                particlesPerIteration: 10
                size: 1
                yOffset: 1
                xFactor: 1
                yFactor: 1.25
                zFactor: 1
                period: 0
                iterations: 1
                visibleRange: 100
        2:
            position: target
            effect: lightning
Clone this wiki locally