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

public class MUCUS extends O2Effect
Mucus effect that spawns small slime entities on a player's head periodically.

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 Details

    • mucusFrequency

      public static final int mucusFrequency
      How 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 plugin
      duration - the duration of the mucus effect in game ticks
      isPermanent - 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:
      checkEffect in class O2Effect
    • 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.

      Specified by:
      doRemove in class O2Effect