Class ExpandMobEffectInstance

java.lang.Object
com.blamejared.crafttweaker.natives.entity.effect.ExpandMobEffectInstance

@ZenRegister public class ExpandMobEffectInstance extends Object
A MobEffectInstance is a wrapper around a MobEffect that has a duration, amplifier, and other properties.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    compareTo(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance other)
    Compares the MobEffectInstance to another MobEffectInstance.
    static int
    getAmplifier(net.minecraft.world.effect.MobEffectInstance internal)
    Gets the amplifier of the MobEffectInstance.
    static String
    getDescriptionId(net.minecraft.world.effect.MobEffectInstance internal)
    Gets the description ID of the MobEffectInstance.
    static int
    getDuration(net.minecraft.world.effect.MobEffectInstance internal)
    Gets the duration of the MobEffectInstance.
    static net.minecraft.world.effect.MobEffect
    getEffect(net.minecraft.world.effect.MobEffectInstance internal)
    Gets the MobEffect of the MobEffectInstance.
    static boolean
    isAmbient(net.minecraft.world.effect.MobEffectInstance internal)
    Gets whether the MobEffectInstance is ambient.
    static boolean
    isVisible(net.minecraft.world.effect.MobEffectInstance internal)
    Gets whether the MobEffectInstance is visible.
    static net.minecraft.world.effect.MobEffectInstance
    load(MapData data)
    Loads a MobEffectInstance from a MapData.
    static net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.world.effect.MobEffect mobEffect, int duration, int amplifier, boolean ambient, boolean visible, boolean showIcon, net.minecraft.world.effect.MobEffectInstance hiddenEffect)
    Creates a new MobEffectInstance.
    static MapData
    save(net.minecraft.world.effect.MobEffectInstance internal)
    Saves the MobEffectInstance to a MapData.
    static boolean
    showIcon(net.minecraft.world.effect.MobEffectInstance internal)
    Gets whether the MobEffectInstance should show an icon.
    static boolean
    tick(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.entity.LivingEntity entity, Runnable onFinish)
    Ticks the MobEffectInstance for the given LivingEntity.
    static boolean
    update(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance instance)
    Updates the MobEffectInstance with the given MobEffectInstance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandMobEffectInstance

      public ExpandMobEffectInstance()
  • Method Details

    • of

      public static net.minecraft.world.effect.MobEffectInstance of(net.minecraft.world.effect.MobEffect mobEffect, int duration, int amplifier, boolean ambient, boolean visible, boolean showIcon, net.minecraft.world.effect.MobEffectInstance hiddenEffect)
      Creates a new MobEffectInstance.
      Parameters:
      mobEffect - The MobEffect to create the instance for.
      duration - The duration of the effect.
      amplifier - The amplifier of the effect.
      ambient - Whether the effect is ambient.
      visible - Whether the effect is visible.
      showIcon - Whether the effect should show an icon.
      hiddenEffect - The hidden effect of the effect.
      Returns:
      A new MobEffectInstance.
    • update

      public static boolean update(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance instance)
      Updates the MobEffectInstance with the given MobEffectInstance.
      Parameters:
      instance - The MobEffectInstance to update with.
      Returns:
      True if the MobEffectInstance was updated, false otherwise.
    • getEffect

      public static net.minecraft.world.effect.MobEffect getEffect(net.minecraft.world.effect.MobEffectInstance internal)
      Gets the MobEffect of the MobEffectInstance.
      Returns:
      The MobEffect of the MobEffectInstance.
    • getDuration

      public static int getDuration(net.minecraft.world.effect.MobEffectInstance internal)
      Gets the duration of the MobEffectInstance.
      Returns:
      The duration of the MobEffectInstance.
    • getAmplifier

      public static int getAmplifier(net.minecraft.world.effect.MobEffectInstance internal)
      Gets the amplifier of the MobEffectInstance.
      Returns:
      The amplifier of the MobEffectInstance.
    • isAmbient

      public static boolean isAmbient(net.minecraft.world.effect.MobEffectInstance internal)
      Gets whether the MobEffectInstance is ambient.
      Returns:
      True if the MobEffectInstance is ambient, false otherwise.
    • isVisible

      public static boolean isVisible(net.minecraft.world.effect.MobEffectInstance internal)
      Gets whether the MobEffectInstance is visible.
      Returns:
      True if the MobEffectInstance is visible, false otherwise.
    • showIcon

      public static boolean showIcon(net.minecraft.world.effect.MobEffectInstance internal)
      Gets whether the MobEffectInstance should show an icon.
      Returns:
      True if the MobEffectInstance should show an icon, false otherwise.
    • tick

      public static boolean tick(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.entity.LivingEntity entity, Runnable onFinish)
      Ticks the MobEffectInstance for the given LivingEntity.
      Parameters:
      entity - The LivingEntity to tick the MobEffectInstance for.
      onFinish - The Runnable to run when the MobEffectInstance finishes.
      Returns:
      True if the MobEffectInstance was ticked, false otherwise.
    • getDescriptionId

      public static String getDescriptionId(net.minecraft.world.effect.MobEffectInstance internal)
      Gets the description ID of the MobEffectInstance.
      Returns:
      The description ID of the MobEffectInstance.
    • save

      public static MapData save(net.minecraft.world.effect.MobEffectInstance internal)
      Saves the MobEffectInstance to a MapData.
      Returns:
      The MapData representation of the MobEffectInstance.
    • load

      public static net.minecraft.world.effect.MobEffectInstance load(MapData data)
      Loads a MobEffectInstance from a MapData.
      Parameters:
      data - The MapData to load the MobEffectInstance from.
      Returns:
      The MobEffectInstance loaded from the MapData.
    • compareTo

      public static int compareTo(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance other)
      Compares the MobEffectInstance to another MobEffectInstance.
      Parameters:
      internal - The MobEffectInstance to compare.
      other - The MobEffectInstance to compare to.
      Returns:
      The result of the comparison.