Skip to content

ReplaceSpell

MomoPewpew edited this page Nov 24, 2024 · 19 revisions

Source Code

spell-class: ".targeted.ReplaceSpell"

Description:

A targeted spell - replaces the targeted block.

Configuration:

Option Description Default Value
y-offset Modifies the start height location. 0
radius-up Radius of the spell up. 1
radius-down Radius of the spell down. 1
radius-horiz Horizontal radius of the spell. 1
duration Duration of the block replacement. 0
point-blank Should it target blocks at the caster's location? false
check-plugins Let plugins recognise the modification of this block by the player. true
replace-random Should it replace blocks with random blocks from replace-with? true
power-affects-radius Should spell power affect radius? false
circle-shape Whether the horizontal radius of the AOE should be circular. Boolean
merge-block-data Should the new block take over some of the block data from the original block? This may prevent you from setting block data manually. true
apply-physics Should a block update be forced when the replace occurs or is undone? false
replace-blocks List of blocks which can be replaced by other blocks. List all to allow all blocks. null
replace-blacklist List of blocks which are irreplaceable. null
replace-with List of blocks which should replace blocks from the replace-blocks list. Every entry in this list accepts a pipe-separated list of blocks, and uses % as a weighting sign. e.g. '5%dirt|10%sand'. If 'same' is used as a block, the ReplaceSpell will do nothing. null
affects-containers If the replace blocks is all and this is set to false, this spell will not affect containers. false

Example:

replaceSpell:
    spell-class: ".targeted.ReplaceSpell"
    point-blank: true
    radius-up: 5
    radius-down: 5 
    radius-horiz: 5
    replace-random: false
    duration: 100
    replace-blocks: 
        - sand
    replace-with:
        - 1%dirt|1%stone|98%null
Clone this wiki locally