Package me.cybersteve.equiplib.util
Class EffectList.Builder
java.lang.Object
me.cybersteve.equiplib.util.EffectList.Builder
- Enclosing class:
EffectList
The Builder for EffectList.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEffect(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon) Add effect to builder.addEffectWithMeta(net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect> effect, EffectMeta meta) Add effect with meta to builder.addFromMobEffectInstance(net.minecraft.world.effect.MobEffectInstance instance) Add effect from mob effect instance to 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.build()Build effect list.
-
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 effectmeta- 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 effectduration- the durationamplifier- the amplifierambient- the ambientshowParticles- the show particlesshowIcon- 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 effectamplifier- the amplifierambient- the ambientshowParticles- the show particlesshowIcon- 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
Build effect list.- Returns:
- the effect list
-