Class MUCUS
MUCUS is a debilitating effect that forces the target player to continuously spawn small slime entities at their eye level (typically on their head/face). Every 15 seconds (300 game ticks), a new size-1 slime entity is spawned at the player's eye location, creating a visual and potentially blocking effect. This effect persists until the duration expires or is manually killed. The effect is detectable by information spells (Informous) which report the target "is unnaturally congested".
Mechanism:
- Spawns size-1 slime entities periodically at player's eye location
- Spawn interval: every 15 seconds (300 game ticks)
- Creates continuous mucus/slime effect on the affected player
- Detectable by information spells (Informous)
- Detection text: "is unnaturally congested"
- Effect expires naturally when duration reaches zero
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow often, in ticks, we spawn another slimeFields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionMUCUS(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a mucus spawning effect. -
Method Summary
Modifier and TypeMethodDescriptionvoidAge the mucus effect and spawn slime entities periodically.voiddoRemove()Perform cleanup when the mucus effect is removed.Methods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill, setPermanent
-
Field Details
-
mucusFrequency
public static final int mucusFrequencyHow often, in ticks, we spawn another slime- See Also:
-
-
Constructor Details
-
MUCUS
public MUCUS(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a mucus spawning effect.Creates an effect that forces the target player to spawn small slime entities periodically. Sets the detection text for information spells to "is unnaturally congested". Slimes are spawned at the player's eye level every 15 seconds throughout the effect duration.
- Parameters:
plugin- a callback to the MC pluginduration- the duration of the mucus effect in game ticksisPermanent- is this effect permanent (does not age)pid- the unique ID of the player to afflict with mucus spawning
-
-
Method Details
-
checkEffect
public void checkEffect()Age the mucus effect and spawn slime entities periodically.Called each game tick. This method ages the effect by 1 tick and checks if the remaining duration is evenly divisible by mucusFrequency (300 ticks). When this condition is true (every 300 ticks), a size-1 slime entity is spawned at the player's eye location. If the player is offline or null, the effect is killed.
- Specified by:
checkEffectin classO2Effect
-
doRemove
public void doRemove()Perform cleanup when the mucus effect is removed.The default implementation does nothing, as the mucus effect has no persistent state to clean up. When removed, the player stops spawning slime entities, though any previously spawned slimes remain in the world and must be cleaned up separately.
-