public interface PotionEffectBuilder extends DataBuilder<PotionEffect>
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 |
from(PotionEffect potionEffect) |
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. |
build
PotionEffectBuilder from(PotionEffect potionEffect)
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 particlesPotionEffect build() throws IllegalStateException
IllegalStateException
- If the potion effect is not completed