Class IMPROVED_BOOK_LEARNING

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

public class IMPROVED_BOOK_LEARNING extends O2Effect
Passive marker effect that increases the effectiveness of book learning for the affected player.

The IMPROVED_BOOK_LEARNING effect is a temporary marker effect that boosts the player's learning rate when reading books to gain skill experience. This effect does not apply any active modifications itself; instead, the skill system checks for this effect's presence and applies a learning effectiveness multiplier when the player gains skill experience from reading books. The effect is passive and only needs to be tracked until expiration.

Mechanism:

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

    • IMPROVED_BOOK_LEARNING

      public IMPROVED_BOOK_LEARNING(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating an improved book learning passive marker effect.

      Creates a temporary marker effect that boosts the player's book learning effectiveness. This effect is passive and does not apply modifications directly; the skill system checks for its presence to apply a learning effectiveness multiplier. Sets the detection text for mind-reading spells to "feels more studious 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 improved book learning
  • Method Details

    • checkEffect

      public void checkEffect()
      Age the improved book learning marker effect each game tick.

      Called each game tick. This effect is passive and only needs to track its remaining duration. The actual learning effectiveness boost is applied by the skill system when it detects this effect's presence on a player reading books. 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 improved book learning effect is removed.

      The default implementation does nothing, as the improved book learning effect is a passive marker with no state to clean up. When removed, the player's book learning returns to normal effectiveness.

      Specified by:
      doRemove in class O2Effect