ReplaceSpell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".targeted.ReplaceSpell"

targeting cast argument values:

Value Supported
entity false
location true
entity_from_location false

Spell Effect Positions:

  • special - Plays the effect at every block placed.
  • blockdestruction - Plays the effect at the block's location after duration (if it was used).

Description:

A targeted spell - replaces the targeted block.

Configuration:

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

Option Description Type Default Supports expressions
y-offset Modifies the start height location. Integer 0 true
radius-up Radius of the spell up. Integer 1 true
radius-down Radius of the spell down. Integer 1 true
radius-horiz Horizontal radius of the spell. Integer 1 true
duration Duration of the block replacement. Integer 0 true
resolve-duration-per-block Since 4.0 Beta 13. Defines expression evaluation behaviour. Boolean false true
point-blank Should it target blocks at the caster's location? Boolean false true
check-plugins Let plugins recognise the modification of this block by the player. Boolean true true
replace-random Should it replace blocks with random blocks from replace-with? Boolean true true
power-affects-radius Should spell power affect radius? Boolean false true
replace-blocks List of blocks which can be replaced by other blocks. List all to allow all blocks. String List false
replace-blacklist List of blocks which are irreplaceable. String List false
replace-with List of blocks which should replace blocks from the replace-blocks list. String List false

Example:

replace:
    spell-class: ".targeted.ReplaceSpell"
    point-blank: true
    duration: 60
    replace-blocks: 
        - grass_block
    replace-with:
        - stone