Skip to content

Explosion Raycast

Entity Action Type

Raycasts and summons an explosion at the hit location.

Type ID: apugli:explosion_raycast

Fields

Field Type Default Description
distance Float optional If set, this is the maximum reach of the raycast. Otherwise this defaults to the entity's respective reaches if not present.
particle Particle Effect optional If set, the particle effect that is displayed on the ray.
spacing Float 0.5 If there is a particle effect, the spacing between the particles displayed on the ray.
direction Vector optional If specified, the direction in which the raycast will travel in.
space String "world" If direction is specified, the Space to perform the raycast in.
power Float Determines the power of the explosion.
block_action Block Action optional If set, the block action(s) to be executed on the block the entity has targeted.
bientity_action Bi-entity Action optional If set, the bi-entity action(s) to be executed on the target entity with the entity that initiated the raycast as the actor and the entity targeted by the raycast as the target.
action_on_hit Entity Action optional If set, the entity action(s) to execute upon hitting a block or entity with the raycast.
destruction_type String "break" Determines if the explosion should destroy the terrain, destroy the terrain and drop the loot of the blocks, or none ("destroy", "break" or "none" respectively).
damage_self Boolean true Determines if the player should take damage from the summoned explosion.
indestructible Block Condition Type optional If specified, the blocks that fulfills the specified block condition type is not destroyed by the summoned explosion.
destructible Block Condition Type optional If specified, the blocks that fulfills this specified block condition type are the only blocks that are destroyed by the summoned explosion.
create_fire Boolean false Determines if the explosion should create fire.
damage_modifier Attribute Modifier optional If set, this modifier will apply to the damage value towards other entities from this explosion.
damage_modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the damage value towards other entities from this explosion.
knockback_modifier Attribute Modifier optional If set, this modifier will apply to the knockback towards other entities from this explosion.
knockback_modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the knockback towards other entities from this explosion.
volume_modifier Attribute Modifier optional If set, this modifier will apply to the volume of the sound event from this explosion.
volume_modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the volume of the sound event from this explosion.
pitch_modifier Attribute Modifier optional If set, this modifier will apply to the pitch of the sound event from this explosion.
pitch_modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the pitch of the sound event from this explosion.
targetable_bientity_condition Bi-entity Condition optional If set, determines if an entity may be targeted by the raycast with the entity that initiated the raycast as the actor and the raycast target as the target.
explosion_damage_bientity_condition Bi-entity Condition optional If set, determines if an entity will be damaged by the explosion with the entity that initiated the raycast as the actor and the entity in the explosion radius as the target.
charged_condition Entity Condition Type optional If set, determined when the charged_modifier and charged_modifiers fields will be used.
charged_modifier Attribute Modifier optional If set, this modifier will apply to the power of the explosion when the charged_condition is met.
charged_modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the power of the explosion when the charged_condition is met.

Examples

"entity_action": {
    "type": "apugli:explode",
    "power": 5,
    "destruction_type": "break",
    "damage_self": true,
    "spawn_effect_cloud": true
}

This example will summon an explosion that will damage the entity that has summoned the explosion and will break blocks caught in the explosion. This will also spawn lingering effect clouds relating to any status effects the entity has at the time.