public interface PotionEffectBuilder extends ImmutableDataBuilder<PotionEffect,PotionEffectBuilder>
PotionEffect
.Modifier and Type | Method and Description |
---|---|
PotionEffectBuilder |
ambience(boolean ambience)
Sets the potion effect to be ambient or not.
|
PotionEffectBuilder |
amplifier(int amplifier)
Sets the amplifier power of the potion effect.
|
PotionEffect |
build()
Builds an instance of a PotionEffect.
|
PotionEffectBuilder |
duration(int duration)
Sets the duration of the potion effect.
|
PotionEffectBuilder |
particles(boolean showsParticles)
Sets the potion effect to show particles when applied or not.
|
PotionEffectBuilder |
potionType(PotionEffectType potionEffectType)
Sets the
PotionEffectType of the potion. |
PotionEffectBuilder |
reset()
Resets all information regarding the item stack to be created.
|
add, add, from
build
PotionEffectBuilder potionType(PotionEffectType potionEffectType)
PotionEffectType
of the potion.potionEffectType
- The type of itemPotionEffectBuilder duration(int duration)
duration
- The duration of this effectPotionEffectBuilder amplifier(int amplifier) throws IllegalArgumentException
Amplifiers must be above zero.
amplifier
- The amplifier powerIllegalArgumentException
- If the amplifier is less than zeroPotionEffectBuilder ambience(boolean ambience)
ambience
- Whether the potion effect is ambientPotionEffectBuilder particles(boolean showsParticles)
showsParticles
- Whether the potion effect will show particlesPotionEffectBuilder reset()
reset
in interface ImmutableDataBuilder<PotionEffect,PotionEffectBuilder>
PotionEffect build() throws IllegalStateException
build
in interface ImmutableDataBuilder<PotionEffect,PotionEffectBuilder>
IllegalStateException
- If the potion effect is not completed