Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper for the native MobEffectInstance class to be used to represent the potion effect that is applied to an entity, or that is going to be applied to them

since

1.0

Hierarchy

Implements

Index

Constructors

  • new MobEffectInstance(id: number): MobEffectInstance
  • new MobEffectInstance(id: number, duration: number): MobEffectInstance
  • new MobEffectInstance(id: number, duration: number, amplifier: number): MobEffectInstance
  • new MobEffectInstance(id: number, duration: number, amplifier: number, isAmbient: boolean, isEffectVisible: boolean, displaysOnScreenTextureAnimation: boolean): MobEffectInstance
  • new MobEffectInstance(id: number, durationPeaceful: number, durationEasy: number, durationNormal: number, durationHard: number, amplifier: number, isAmbient: boolean, isEffectVisible: boolean, displaysOnScreenTextureAnimation: boolean): MobEffectInstance
  • Constructs new MobEffectInstance object by given potion effect numeric ID.

    • Note: MobEffectInstance created via any of the exported constructors is not linked to a native object
    since

    1.0

    Parameters

    • id: number

    Returns MobEffectInstance

  • Constructs new MobEffectInstance object by given potion effect numeric ID and effect duration.

    • Note: MobEffectInstance created via any of the exported constructors is not linked to a native object
    since

    1.0

    Parameters

    • id: number
    • duration: number

    Returns MobEffectInstance

  • Constructs new MobEffectInstance object by given potion effect numeric ID, effect duration and amplifier.

    • Note: MobEffectInstance created via any of the exported constructors is not linked to a native object
    since

    1.0

    Parameters

    • id: number
    • duration: number
    • amplifier: number

    Returns MobEffectInstance

  • Constructs new MobEffectInstance object using a wide set of parameters.

    • Note: MobEffectInstance created via any of the exported constructors is not linked to a native object
    since

    1.0

    Parameters

    • id: number

      numeric ID of the potion effect

    • duration: number

      effect duration

    • amplifier: number

      effect amplifier (remember that amplifier is 1 less than effect level displayed like a roman numeral)

    • isAmbient: boolean

      unknown parameter, set to false

    • isEffectVisible: boolean

      whether the effect produces particles coming from an entity with it applied

    • displaysOnScreenTextureAnimation: boolean

      whether the effect is visible in potion effects window

    Returns MobEffectInstance

  • Constructs new MobEffectInstance object using a wide set of parameters.

    • Note: MobEffectInstance created via any of the exported constructors is not linked to a native object
    since

    3.0

    Parameters

    • id: number

      numeric ID of the potion effect

    • durationPeaceful: number

      effect duration on peaceful game difficulty

    • durationEasy: number

      effect duration on easy game difficulty

    • durationNormal: number

      effect duration on normal game difficulty

    • durationHard: number

      effect duration on hard game difficulty

    • amplifier: number

      effect amplifier (remember that amplifier is 1 less than effect level displayed like a roman numeral)

    • isAmbient: boolean

      unknown parameter, set to false

    • isEffectVisible: boolean

      whether the effect produces particles coming from an entity with it applied

    • displaysOnScreenTextureAnimation: boolean

      whether the effect is visible in potion effects window

    Returns MobEffectInstance

Properties

class: Class<Object>

Methods

  • clone(): any
  • displaysOnScreenTextureAnimation(): boolean
  • since

    1.0

    Returns boolean

    whether the effect is visible in potion effects window

  • equals(param0: any): boolean
  • finalize(): void
  • getAmplifier(): number
  • since

    1.0

    Returns number

    effect amplifier (remember that amplifier is 1 less than effect level displayed like a roman numeral)

  • getDifficultyDuration(difficulty: 2 | 1 | 3): number
  • since

    3.0

    Parameters

    • difficulty: 2 | 1 | 3

    Returns number

    effect duration for a specific game difficulty above peaceful (1 - easy, 2 - normal, 3 - hard). If it's not specified, -1 is returned.

  • getDuration(): number
  • getId(): number
  • since

    1.0

    Returns number

    numeric ID of the potion effect

  • getLingerDuration(): number
  • since

    3.0

    Returns number

    effect duration if it is applied as a lingering potion (it is actually duration * 0.25)

  • getPointer(): number
  • getSplashDuration(): number
  • since

    3.0

    Returns number

    effect duration if it is applied as a splash potion (it is actually duration * 0.75)

  • hasDifficultyDuration(difficulty: 2 | 1 | 3): boolean
  • since

    3.0

    Parameters

    • difficulty: 2 | 1 | 3

    Returns boolean

    whether the following MobEffectInstance has duration for a specific game difficulty above peaceful

  • hashCode(): number
  • isAmbient(): boolean
  • isEffectVisible(): boolean
  • since

    3.0

    Returns boolean

    whether the effect produces particles coming from an entity with it applied

  • isNoCounter(): boolean
  • notify(): void
  • notifyAll(): void
  • setDifficultyDuration(difficulty: 2 | 1 | 3, duration: number): void
  • Sets effect duration for a specific game difficulty above peaceful (1 - easy, 2 - normal, 3 - hard)

    since

    3.0

    Parameters

    • difficulty: 2 | 1 | 3
    • duration: number

    Returns void

  • setDuration(duration: number): void
  • Sets current effect duration

    since

    3.0

    Parameters

    • duration: number

    Returns void

  • setNoCounter(noCounter: boolean): void
  • since

    3.0

    Parameters

    • noCounter: boolean

    Returns void

  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void

Generated using TypeDoc