Class IMPROVED_BOOK_LEARNING
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:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionIMPROVED_BOOK_LEARNING(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating an improved book learning passive marker effect. -
Method Summary
Modifier and TypeMethodDescriptionvoidAge the improved book learning marker effect each game tick.voiddoRemove()Perform cleanup when the improved book learning effect is removed.Methods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill, setPermanent
-
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 pluginduration- the duration of the effect in game ticksisPermanent- true if this effect is permanent, false if it is notpid- 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:
checkEffectin classO2Effect
-
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.
-