Skip to content

Targeted Carpet Spell

JasperLorelai edited this page May 19, 2024 · 12 revisions

Source Code

spell-class: ".targeted.CarpetSpell"
Value Supported
entity false
location true
entity_from_location false

Description:

Summon a block at the targeted location which when stepped on will be restored and cast the spell on the target that stepped on it. It can be used to make spells like landmines. Before 4.0 Beta 14 the caster of this spell will not be able to trigger it and the spell only supports player targets.

Configuration:

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

Option Description Type Default Supports expressions
block Block material the platform is made of. String "white_carpet" true
radius Radius of the platform (in blocks). Integer 1 true
duration Duration of the platform (int ticks). Integer 0 true
touch-check-interval Defines how often in server ticks it should check players touching the carpet. Integer 3 false
circle Defines whether the carpets should form a circle. Boolean false true
remove-on-touch Defines whether the carpets should disappear when someone touches it. Boolean true true
power-affects-radius Boolean true true
spell-on-touch Sub-spell to cast when someone touches the carpet. String "" false

Example:

carpet:
    spell-class: ".targeted.CarpetSpell"
    range: 100
    block: white_carpet
    radius: 2
    duration: 200
    touch-check-interval: 20
    remove-on-touch: true
    circle: true
Clone this wiki locally