Skip to content

FillSpell

MomoPewpew edited this page Dec 9, 2023 · 1 revision

Source Code

spell-class: ".targeted.FillSpell"

Description:

A targeted spell that fills up a sphere shape from bottom to top with a flood fill algorithm.

Configuration:

Option Description Default Value
point-blank Should it target blocks at the caster's location? false
full-sphere if false, the flood fill algorithm will only fill blocks that are underneath the target, making a half sphere instead of a full one. true
max-fill-blocks How many blocks are filled in with every casting of this spell. 1
radius The radius of sphere that the algorithm will attempt to flood. 5
to-replace List of blocks which can be replaced by the flood fill algorithm. air
replace-with List of blocks that will be randomized from in the flood fill algorithm. air

Example:

dirthose-replace:
    spell-class: ".targeted.FillSpell"
    full-sphere: false
    point-blank: false
    max-fill-blocks: 1
    to-replace:
        - air
        - sand
    replace-with:
        - dirt
    radius: 2
Clone this wiki locally