-
-
Notifications
You must be signed in to change notification settings - Fork 10
Ability datapacks
Since Everlasting Abilities version 2.x (Minecraft 1.19.2+), abilities can be added, removed, and modified via Minecraft datapacks.
This page assumes knowledge about creating custom datapacks.
Below, you can find an example of the Absorption ability, which is based on the Minecraft Absorption mob effect:
{
"type": "everlastingabilities:effect",
"target": "self",
"name": "ability.everlastingabilities.absorption",
"rarity": "rare",
"max_level": 5,
"xp_per_level": 75,
"effect": "minecraft:absorption",
"tick_modulus": 200,
"amplifier_factor": 0.5,
"level_based_duration": true,
"duration_factor": 1
}
In order to target add abilities, your new datapack must be created at data/<datapack_namespace>/everlastingabilities/abilities/
.
All default abilities are created at data/everlastingabilities/everlastingabilities/abilities/
, and can therefore be overridden at this location.
For example, overriding the absorption effect requires creating a new file at <world-root>/datapacks/<datapack-name>/data/everlastingabilities/everlastingabilities/abilities/effect/absorption.json
.
All default locations can be found here, and can be viewed here.
To fully disable an ability, the following fields can be set to false
:
"obtainable_on_player_spawn": false,
"obtainable_on_mob_spawn": false,
"obtainable_on_craft": false,
"obtainable_on_loot": false,
Different ability types are available in this mod (and other mods may add support for other types), which are identified by the "type"
entry in JSON files.
The table below summarizes these types, and later sections in this wiki explain further details on them.
Type | Description |
---|---|
everlastingabilities:effect |
Abilities that add an effect to the player or surrounding entities. |
everlastingabilities:attribute_modifier |
Abilities that add an attribute modifier to the player. (Since 2.1.0) |
everlastingabilities:special_bonemealer |
Special ability that adds a bonemealing effect. |
everlastingabilities:special_fertility |
Special ability that fertilizes surroundings. |
everlastingabilities:special_flight |
Special ability that enables flight-mode. |
everlastingabilities:special_magnetize |
Special ability that attracts items. |
everlastingabilities:special_power_stare |
Special ability that pushes away other mobs when shift-looking. |
everlastingabilities:special_step_assist |
Special ability that enables step-assist. |
The table below summarizes all JSON properties that can be used for all ability types.
Name | Description | Default |
---|---|---|
type |
Indicates the type of the ability | / |
name |
The unlocalized name of the ability. If this name with .info prefix is available as well, that will be used as description. |
/ |
rarity |
Rarity of the ability: common , uncommon , rare , epic
|
/ |
max_level |
The maximum level this ability can have. | / |
xp_per_level |
The number of XP that is required to enable one level of this ability. | / |
obtainable_on_player_spawn |
If this ability could be obtained when the player first spawns. | true |
obtainable_on_mob_spawn |
If this ability can spawn at a mob. | true |
obtainable_on_craft |
If this ability can be obtained when recycling Ability Totems. | true |
obtainable_on_loot |
If this ability can be found in loot chests. | true |
condition |
The condition under which this ability should be available. Read more here. | / |
The table below summarizes all JSON properties that can be used for effect abilities.
Name | Description | Default |
---|---|---|
effect |
The effect id. | / |
target |
If effects target the player or surrounding mobs: self , radius
|
/ |
targets_friendly_mobs |
If this ability can also target friendly mobs. (only for radius )
|
true |
radius_factor |
The radius in number of blocks, that will be multiplied by the ability level. (only for radius )
|
2 |
tick_modulus |
After how many ticks the effect should be applied. | 10 |
level_based_duration |
If true, the duration of an effect is based on level / max_level * duration_factor . If false, duration is tick_modulus * duration_factor . |
false |
duration_factor |
The multiplier for durations. | 5 |
amplifier_factor |
A multiplier for the effect's amplifier. | 1 |
The table below summarizes all JSON properties that can be used for attribute modifier abilities.
Name | Description | Default |
---|---|---|
attribute |
The attribute id. | / |
amount_factor |
The amount to modify. | / |
operation |
A multiplier for the effect's amplifier. | "add_value" , "add_multiplied_base" or "add_multiplied_total" |
The following special ability types have custom properties:
Name | Description | Default |
---|---|---|
move_xp |
If XP orbs should also be attracted. | true |
Name | Description | Default |
---|---|---|
require_sneak |
If the player must sneak before the ability can be used. | true |
By adding a condition
to an ability, you can make it so that an ability will only be registered if certain criteria are made.
For example, you can make an ability only available to players if the cyclopscore
mod is available as follows:
{
"type": "everlastingabilities:special_bonemealer",
"name": "ability.everlastingabilities.bonemealer",
"rarity": "uncommon",
"max_level": 5,
"xp_per_level": 30,
"condition": {
"type": "neoforge:mod_loaded",
"modid": "cyclopscore"
}
}
If no condition is defined, the ability will always be enabled.
You can define more complex conditions by making use of NeoForge's built-in conditions. This includes other condition types that may be registered by other mods.
The default datapack contains the following abilities:
everlastingabilities:attribute_modifier/attack_steroids
everlastingabilities:attribute_modifier/block_range
everlastingabilities:attribute_modifier/entity_range
everlastingabilities:attribute_modifier/heart_gainer
everlastingabilities:attribute_modifier/hidden_chestplate
everlastingabilities:attribute_modifier/impacting_legs
everlastingabilities:attribute_modifier/knockback
everlastingabilities:attribute_modifier/swift_sneak
everlastingabilities:effect/absorption
everlastingabilities:effect/bad_omen
everlastingabilities:effect/bad_omen_self
everlastingabilities:effect/blindness
everlastingabilities:effect/conduit_power
everlastingabilities:effect/darkness
everlastingabilities:effect/dolphins_grace
everlastingabilities:effect/fire_resistance
everlastingabilities:effect/glowing
everlastingabilities:effect/haste
everlastingabilities:effect/hero_of_the_village
everlastingabilities:effect/hunger
everlastingabilities:effect/infested
everlastingabilities:effect/invisibility
everlastingabilities:effect/jump_boost
everlastingabilities:effect/levitation
everlastingabilities:effect/luck
everlastingabilities:effect/mining_fatigue
everlastingabilities:effect/nausea
everlastingabilities:effect/night_vision
everlastingabilities:effect/oozing
everlastingabilities:effect/poison
everlastingabilities:effect/regeneration
everlastingabilities:effect/resistance
everlastingabilities:effect/saturation
everlastingabilities:effect/slow_falling
everlastingabilities:effect/slowness
everlastingabilities:effect/speed
everlastingabilities:effect/strength
everlastingabilities:effect/unluck
everlastingabilities:effect/water_breathing
everlastingabilities:effect/weakness
everlastingabilities:effect/weaving
everlastingabilities:effect/wind_charged
everlastingabilities:effect/wither
everlastingabilities:special/bonemealer
everlastingabilities:special/fertility
everlastingabilities:special/flight
everlastingabilities:special/magnetize
everlastingabilities:special/power_stare
everlastingabilities:special/step_assist