Class MobEffectUtil

java.lang.Object
dev.latvian.mods.kubejs.util.MobEffectUtil

public class MobEffectUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect)
     
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration)
     
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier)
     
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier, boolean ambient, boolean visible)
     
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier, boolean ambient, boolean visible, boolean showIcon)
     
    static @NotNull net.minecraft.world.effect.MobEffectInstance
    of(net.minecraft.world.effect.MobEffectInstance oldInstance)
     

    Methods inherited from class java.lang.Object

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

    • MobEffectUtil

      public MobEffectUtil()
  • Method Details

    • of

      @Contract("_ -> new") @Info("Copies an existing MobEffectInstance") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.world.effect.MobEffectInstance oldInstance)
    • of

      @Contract("_ -> new") @Info("Creates an instance for the given effect. Default duration and amplifier is 0") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect)
    • of

      @Contract("_, _ -> new") @Info("Creates an instance for the given effect and duration (in ticks)") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration)
    • of

      @Contract("_, _, _ -> new") @Info("Creates an instance for the given effect, duration and amplifier") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier)
    • of

      @Contract("_, _, _, _, _ -> new") @Info("Creates an instance for the given effect, duration, amplifier, ambient, and visible to the HUD") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier, boolean ambient, boolean visible)
    • of

      @Contract("_, _, _, _, _, _ -> new") @Info("Creates an instance for the given effect, duration, amplifier, ambient, visible to the HUD, and to show the icon on the sceen") @NotNull public static @NotNull net.minecraft.world.effect.MobEffectInstance of(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, TickDuration duration, int amplifier, boolean ambient, boolean visible, boolean showIcon)