Class FAST_LEARNING

java.lang.Object
net.pottercraft.ollivanders2.effect.O2Effect
net.pottercraft.ollivanders2.effect.FAST_LEARNING

public class FAST_LEARNING extends O2Effect
Passive marker effect that boosts skill experience gain for the affected player.

The FAST_LEARNING effect is a temporary marker effect that increases the rate at which the player gains experience when using skills (book learning, spell practice, etc.). This effect does not apply any active modifications itself; instead, the skill system checks for this effect's presence and applies an experience multiplier when the player gains skill experience. The effect is passive and only needs to be tracked until expiration.

Mechanism:

  • Passive marker effect - no active behavior during each tick
  • Skill system applies experience multiplier when this effect is present
  • Detectable by mind-reading spells (Legilimens)
  • Detection text: "feels more mentally alert than usual"
  • Effect expires naturally when duration reaches zero
  • Constructor Details

    • FAST_LEARNING

      public FAST_LEARNING(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating a fast learning skill experience boost effect.

      Creates a temporary marker effect that boosts skill experience gain. This effect is passive and does not apply modifications directly; the skill system checks for its presence to apply an experience multiplier. Sets the detection text for mind-reading spells to "feels more mentally alert than usual".

      Parameters:
      plugin - a callback to the MC plugin
      duration - the duration of the effect in game ticks
      isPermanent - true if this effect is permanent, false if it is not
      pid - the unique ID of the player to grant fast learning
  • Method Details

    • checkEffect

      public void checkEffect()
      Age the fast learning marker effect.

      Called each game tick. This effect is passive and only needs to track its remaining duration. The actual experience multiplier is applied by the skill system when it detects this effect's presence on a player gaining skill experience. When the duration reaches zero, the effect is automatically killed and removed from the player.

      Specified by:
      checkEffect in class O2Effect
    • doRemove

      public void doRemove()
      Perform cleanup when the fast learning effect is removed.

      The default implementation does nothing, as the fast learning effect is a passive marker with no state to clean up. When removed, the player simply stops receiving the experience multiplier boost from the skill system.

      Specified by:
      doRemove in class O2Effect