Interface PotionContents.Builder
- All Superinterfaces:
DataComponentBuilder<PotionContents>
- Enclosing interface:
PotionContents
@Experimental
@NonExtendable
public static interface PotionContents.Builder
extends DataComponentBuilder<PotionContents>
-
Method Summary
Modifier 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 DataComponentBuilder
build
-
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
-
customName
-
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:
-