Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Components

Components are small, standalone and composable bits of code that usually do only one thing or small variations of that one thing.

The core of it all is the AbilityComponent which components inherit from and which handles some basic shared aspects for all components such as its parent ability, tick rate, bonuses and such.

Some of these components are used purely as data storage, some as event triggers and some have more in-depth functionalities.

Here's a list of all currently available components and what they're used for:

  • CooldownComponent - handles cooldowns
  • DisableComponent - disables the ability and all of its components, this is different from the generic component's isDisabled which disables the component itself
  • ContinuousComponent - handles continuity of an ability, which is to say holding it active for short to long periods of time
  • ChargeComponent - handles charging of an ability
  • RepeaterComponent - used to trigger one specific action every N ticks
  • AnimationComponent - used to change and keep track of the player's animation while an ability is used
  • HitTrackerComponent - tracks which entities got hit
  • GaugeComponent - handles a GUI gauge on the left side of the ability bar handling arbitrary data
  • SkinOverlayComponent - used to add overlays on top of the player's skin for different parts of the body
  • ChangeStatsComponent - used to change a player's stats, aka attributes, via attribute modifiers
  • SlotDecorationComponent - used to handle an ability slot's rendering, this is internally used to make slots red during cooldown for example
  • PoolComponent - handles the pool an ability is in
  • BowTriggerComponent - used as an event trigger for when a bow is shot
  • DamageTakenComponent - middleware for when the player takes damage, can block or change this incoming damage
  • ItemSpawnComponent - used to spawn items bound to the ability
  • StackComponent - handles stack data for an ability, which is fancy way for saying it handles a counter
  • AltModeComponent - handles an ability's alternative modes
  • DealDamageComponent - used to deal damage to a target
  • PauseTickComponent - pauses an ability's ticking, some components that don't have any ticking might not get influenced by this
  • HitTriggerComponent - used as an event trigger for when hitting a target
  • AnimeScreamComponent - handles the anime screaming of an ability, used but deprecated and probably broken
  • SwitchModeComponent - alternative to AltModeComponent except its unused and deprecated
  • SwingTriggerComponent - used as an event trigger for when swinging the arm, doesn't matter if it hit something or not
  • RangeComponent - handles range related functionality such as getting nearby entities or blocks
  • MorphComponent - handles a player's morph state (such as for zoans)
  • GrabEntityComponent - used for grabbing targets, handles multiple ways of grabbing them and holding them
  • ProjectileComponent - used for projectiles, creating them, spawning them and so on, mostly used for convenience and to automatically handle certain edge cases such as the Hissatsu ability
  • HealComponent - heals the target, opposite of DealDamageComponent
  • RequireMorphComponent - checks if the player has the required morph in order to use this ability
  • RequireAbilityComponent - checks if the player has the required ability and if it is in the correct state or if it can be forced into said state (only used by Gear Fourth to check for or activate Busoshoku Haki)

All these components can be added to any ability via Ability::addComponents method, a minimal example would look like this:

private final ContinuousComponent continuousComponent = new ContinuousComponent(this);

public TestAbility(AbilityCore<TestAbility> core) {
    super(core);

    this.addComponents(this.continuousComponent);
}

Due to this composeable system the modder is free to mix and match these components however they see fit or even create new components for their specialized needs.

Defaults

Ability and PassiveAbility classes have certain components builtin to them for convenience so you don't need to reimplement them.

Ability uses DisableComponent, CooldownComponent, AnimeScreamComponent

PassiveAbility uses DisableComponent, CooldownComponent, PauseTickComponent

Other more high level archtypes make use of even more components as part of their default behavior, for example MorphAbility implements ContinuousComponent, ChangeStatsComponent and MorphComponent all of which are needed for most currently implemented morphs.

Make sure to check which components an ability implements first as to not overwrite important behaviors.

Last change: 2026-03-08