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

Source Code

effect: itemspray

Description:

Spawns in a spray of items. The items cannot be picked up. They are removed after the defined duration.

Configuration:

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

Option Description Type Default
type A material to drop. Material
amount Defines the number of items to drop. Integer 15
duration Defines the lifetime of the dropped items. Integer 10
resolve-duration-per-item Since 4.0 Beta 14. Defines if the duration option is resolved multiple times per item spawned. Boolean false
gravity Since 4.0 Beta 14. Defines whether the items have gravity. Boolean true
remove-item-friction Since 4.0 Beta 14. Removes the items' friction if true. Boolean false
velocity Since 4.0 Beta 14. Defines the velocity of the spawned items. Value is multiplied by the force option before being applied. Vector x, y, and z are rand(0, 1) - 0.5
force Multiplier by which the spread of dropped items is defined. (Velocity of each item is an x,y,z vector of rand(0, 1) - 0.5 multiplied by force) Double 1
resolve-force-per-item Since 4.0 Beta 13. Defines expression evaluation behaviour. Boolean false

Example:

effects:
    eff1:
        position: projectile
        effect: itemspray
        type: diamond
        amount: 5
        duration: 100
        force: 1.5
Clone this wiki locally