Class EffectList.Builder

java.lang.Object
me.cybersteve.equiplib.util.EffectList.Builder
Enclosing class:
EffectList

public static class EffectList.Builder extends Object
The Builder for EffectList.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new Builder.
  • Method Details

    • addEffectWithMeta

      public EffectList.Builder addEffectWithMeta(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, EffectMeta meta)
      Add effect with meta to builder.
      Parameters:
      effect - the effect
      meta - the meta
      Returns:
      the builder
    • addEffect

      public EffectList.Builder addEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon)
      Add effect to builder. Makes
      Parameters:
      effect - the effect
      duration - the duration
      amplifier - the amplifier
      ambient - the ambient
      showParticles - the show particles
      showIcon - the show icon
      Returns:
      the builder
    • addInfiniteEffect

      public EffectList.Builder addInfiniteEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, int amplifier, boolean ambient, boolean showParticles, boolean showIcon)
      Add effect with infinite duration to builder.
      Parameters:
      effect - the effect
      amplifier - the amplifier
      ambient - the ambient
      showParticles - the show particles
      showIcon - the show icon
      Returns:
      the builder
    • addFromMobEffectInstance

      public EffectList.Builder addFromMobEffectInstance(net.minecraft.world.effect.MobEffectInstance instance)
      Add effect from mob effect instance to builder.
      Parameters:
      instance - the MobEffectInstance
      Returns:
      the builder
    • build

      public EffectList build()
      Build effect list.
      Returns:
      the effect list