Interface PotionContents.Builder
- All Superinterfaces:
- DataComponentBuilder<PotionContents>
- Enclosing interface:
- PotionContents
@Experimental
@NonExtendable
public static interface PotionContents.Builder
extends DataComponentBuilder<PotionContents>
- 
Method SummaryModifier and TypeMethodDescriptionaddCustomEffect(PotionEffect effect) Adds a custom effect instance to this builder.addCustomEffects(List<PotionEffect> effects) Adds custom effect instances to this builder.customColor(@Nullable Color color) Sets the color override for this builder.customName(@Nullable String name) Sets the suffix to the translation key of the potion item.potion(@Nullable PotionType type) Sets the potion type for this builder.Methods inherited from interface io.papermc.paper.datacomponent.DataComponentBuilderbuild
- 
Method Details- 
potion@Contract(value="_ -> this", mutates="this") PotionContents.Builder potion(@Nullable PotionType type) Sets the potion type for this builder.- Parameters:
- type- builder
- Returns:
- the builder for chaining
- See Also:
 
- 
customColor@Contract(value="_ -> this", mutates="this") PotionContents.Builder customColor(@Nullable Color color) Sets the color override for this builder.- Parameters:
- color- color
- Returns:
- the builder for chaining
- See Also:
- API Note:
- alpha channel of the color is supported only for Tipped Arrow
 
- 
customName@Contract(value="_ -> this", mutates="this") PotionContents.Builder customName(@Nullable String name) Sets the suffix to the translation key of the potion item.- Parameters:
- name- name
- Returns:
- the builder for chaining
- See Also:
 
- 
addCustomEffect@Contract(value="_ -> this", mutates="this") PotionContents.Builder addCustomEffect(PotionEffect effect) Adds a custom effect instance to this builder.- Parameters:
- effect- effect
- Returns:
- the builder for chaining
- See Also:
 
- 
addCustomEffects@Contract(value="_ -> this", mutates="this") PotionContents.Builder addCustomEffects(List<PotionEffect> effects) Adds custom effect instances to this builder.- Parameters:
- effects- effects
- Returns:
- the builder for chaining
- See Also:
 
 
-