Skip to content

AbilityEntityEffect

seelderr edited this page Jan 19, 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.

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.

The key for this type is "projectile".

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.

The key for this type is "summon_entity".

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.

The key for this type is "damage_modification".

Schema

{
     "modifications": [DamageModification]         // [Mandatory] || The damage modifications to apply to the entity.
}

Breath Particles

Spawns breath particles from the caster. This only works with self targeting.

Schema

{
    "spread": [number]                      // [Mandatory] || The spread of the breath particles.
    "speed_per_size": [number]              // [Mandatory] || The increase in speed based on the dragon's size.
    "main_particle": [ParticleOption]       // [Mandatory] || The main particle for the breath effect.
    "secondary_particle": [ParticleOption]  // [Mandatory] || The secondary particle for the breath effect.
}

Ignite

Ignites the entity.

The key for this type is "ignite".

Schema

{
    "ignite_ticks": [LevelBasedValue]       // [Mandatory] || Amount of ticks to ignite the entity for.
}

Harvest Bonus

Grants a list of harvest bonuses to the entity.

The key for this type is "harvest_bonus".

Schema

{
    "bonuses": [HarvestBonus]     // [Mandatory] || The harvest bonuses to apply.
}

On Attack

Makes the entity apply a potion effect on attacks. Defined by PotionData.

The key for this type is "on_attack".

Schema

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

Spin

Grants the spin ability to the given entity.

The key for this type is "spin".

Schema

{
    "spin_level": [number]         // [Mandatory] || The level at which the spin ability is unlocked.
    "swim_spin_fluid": [FluidType] // [Mandatory] || What fluids are valid to spin in if the spin ability is unlocked.
}

Flight

Grants the flight ability to the given entity.

The key for this type is "flight".

Schema

{
    "flight_level": [number]         // [Mandatory] || The level at which the flight ability is unlocked.
}

Item Conversion

Converts item entities that meet a predicate into a random list of other items.

The key for this type is "item_conversion".

ItemConversionData

An entry to represent a conversion of items that meet a predicate into a random list of other items. Uses an ItemPredicate.

Schema

    "item_predicate": [ItemPredicate]                 // [Mandatory] || The item predicate to convert from.
    "items_to": [SimpleWeightedRandomList of Items]   // [Mandatory] || The items to convert to.

Schema

{
    "item_conversions": [ItemConversionData]      // [Mandatory] || The conversions to try to apply.
    "probability": [LevelBasedValue]              // [Mandatory] || The probability of a conversion being attempted.
}

Swim

Grants the ability to swim in a specific fluid, and specifies the maximum oxygen in said fluid.

The key for this type is "swim".

Schema

{
    "max_oxygen": [LevelBasedValue]        // [Mandatory] || The maximum oxygen in the given fluid.
    "fluid_type": [FluidType]              // [Mandatory] || The fluid type to be able to swim in.
}

Effect Modification

Applies an effect modification to the target.

The key for this type is "effect_modification".

Schema

{
    "modifications": [EffectModification]        // [Mandatory] || The list of effect modifications to apply
}

Particle

Creates particles on the given entity given SpawnParticles data.

The key for this type is "particle".

Schema

{
    "particle_data": [ParticleData]        // [Mandatory] || The data for the particles being spawned
    "particle_count": [LevelBasedValue]    // [Mandatory] || The number of particles to spawn
}

Glow

Applies a glow outline to the entity given Glow data.

The key for this type is "glow".

Schema

{
    "glows": [Glow]        // [Mandatory] || List of glows to apply
}

Oxygen Bonus

Applies an oxygen bonus to the entity given OxygenBonus data.

The key for this type is "oxygen_bonus"

Schema

{
    "bonuses": [OxygenBonus]        // [Mandatory] || List of oxygen bonuses to apply
}

Block Vision

Gives the ability to see blocks through walls given BlockVision data.

The key for this type is "block_vision"

Schema

{
    "block_visions": [BlockVision]        // [Mandatory] List of block visions to apply
}

Function

Runs a function on the target.

The key for this type is '"function"'.

Schema

{
    "function": [ResourceLocation]       // [Mandatory] || The location of the function file
}
Datapack Documentation
Clone this wiki locally