Skip to content

AbilityEntityEffect

seelderr edited this page Jan 3, 2025 · 15 revisions

Description

An AbilityEntityEffect is an effect from an ability that is applied to a specific entity. Each effect applies to one entity at a time, determined by the AbilityTargeting.

Parents

This object is used by the following objects:

  1. AbilityTargeting

AbilityEntityEffect Types

Damage

Deals an amount of damage to the entity. To see available damage types, see this for vanilla damage types and this for dragon survival damage types.

The key for this type is "damage"

Schema

{
    "type": [DamageType]                // [Mandatory] || The type of damage dealt.
    "amount": [LevelBasedValue]         // [Mandatory] || The amount of damage dealt.
}

Modifier

Applies a list of ModifierWithDuration(s) to the entity.

The key for this type is "modifier"

Schema

{
    "modifiers": [ModifierWithDuration] // [Mandatory] || The list of modifiers to apply.
}

Potion

Applies a list of mob effects as determined by PotionData to the entity.

The key for this type is "potion"

Schema

{
    "potion": [PotionData] // [Mandatory] || The potion data to apply.
}

Projectile

Summons a custom projectile with its own properties. This is the most complex ability effect, and for this reason Projectiles have their own registry entries.

TargetDirection

The TargetDirection for a projectile effect is the direction in which a projectile is fired. There are a few options:

"towards_entity"    // Fire the projectile towards the targeted entity, from the caster of the ability
"looking_at"        // Fire the projectile in the direction the entity is looking.
"down"
"up"
"north"
"south"
"west"
"east"

Schema

{
    "projectile_data": [Projectile]            // [Mandatory] || The projectile to fire.
    "target_direction": [TargetDirection]      // [Mandatory] || Which way the projectile is fired.
    "number_of_projectiles": [LevelBasedValue] // [Mandatory] || How many projectiles are fired.
    "projectile_spread": [LevelBasedValue]     // [Optional]  || The projectile spread. Defaults to 0.
    "speed": [LevelBasedValue]                 // [Mandatory] || The speed at which the projectile is fired.
}

Summon Entity

Summons a weighted list of entities, and applies a list of attributes to them.

AttributeScale

A list of attributes to scale by the scaling value.

Schema

{
    "attributes": [Attribute]    // [Mandatory] || List of attributes to scale.
    "scale": [LevelBasedValue]   // [Mandatory] || The amount to scale by.
}

Schema

{
    "entities": [SimpleWeightedRandomList of Entities]       // [Mandatory] || The entities to summon.
    "id": [ResourceLocation]                                 // [Mandatory] || The ID to tag the summoned entities with.
    "max_summons": [LevelBasedValue]                         // [Mandatory] || The max number of entities that can be summoned by this ability.
    "duration": [LevelBasedValue]                            // [Optional]  || How long the summoned entities stay before disappearing. Defaults to infinite duration (-1).
    "attribute_scales": [AttributeScale]                     // [Optional]  || The attributes to scale on the summoned entities.
    "should_set_allied": [bool]                              // [Optional]  || Whether the summoned entities are allied or not. Defaults to true.
}

Damage Modification

Grants a list of damage modification to the entity.

{
     "modifications": [DamageModification]         // [Mandatory] || The damage modifications to apply to the entity.
}
Datapack Documentation
Clone this wiki locally