Interface MobEffectInstance


@NonExtendable public interface MobEffectInstance
A status effect running on a living entity, such as minecraft:speed for ten seconds.

Instances are immutable and created through the MobEffectRegistry of the server.

Since:
0.1.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Duration of an effect that never runs out.
    static final int
    Highest amplifier the client can display.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true for effects coming from a beacon or a conduit, drawn with fainter particles.
    int
    Returns the level minus one, from 0 to MAX_AMPLIFIER.
    int
    Returns the remaining ticks, or INFINITE_DURATION.
    boolean
    Returns true if this effect never runs out.
    boolean
    Returns true when the icon is shown in the HUD of a player.
    Returns a builder starting from this effect, to derive a changed copy.
    Returns the effect, a minecraft:mob_effect entry.
    boolean
    Returns true when the swirling particles are shown.
  • Field Details

    • INFINITE_DURATION

      static final int INFINITE_DURATION
      Duration of an effect that never runs out.
      Since:
      0.1.0
      See Also:
    • MAX_AMPLIFIER

      static final int MAX_AMPLIFIER
      Highest amplifier the client can display.
      Since:
      0.1.0
      See Also:
  • Method Details

    • type

      Returns the effect, a minecraft:mob_effect entry.
      Returns:
      the effect, a minecraft:mob_effect entry
      Since:
      0.1.0
    • duration

      int duration()
      Returns the remaining ticks, or INFINITE_DURATION.
      Returns:
      the remaining ticks, or INFINITE_DURATION
      Since:
      0.1.0
    • amplifier

      int amplifier()
      Returns the level minus one, from 0 to MAX_AMPLIFIER.
      Returns:
      the level minus one, from 0 to MAX_AMPLIFIER
      Since:
      0.1.0
    • ambient

      boolean ambient()
      Returns true for effects coming from a beacon or a conduit, drawn with fainter particles.
      Returns:
      true for effects coming from a beacon or a conduit, drawn with fainter particles
      Since:
      0.1.0
    • visible

      boolean visible()
      Returns true when the swirling particles are shown.
      Returns:
      true when the swirling particles are shown
      Since:
      0.1.0
    • showIcon

      boolean showIcon()
      Returns true when the icon is shown in the HUD of a player.
      Returns:
      true when the icon is shown in the HUD of a player
      Since:
      0.1.0
    • isInfinite

      boolean isInfinite()
      Returns true if this effect never runs out.
      Returns:
      true if this effect never runs out
      Since:
      0.1.0
    • toBuilder

      Returns a builder starting from this effect, to derive a changed copy.
      Returns:
      a builder starting from this effect, to derive a changed copy
      Since:
      0.1.0