Interface ObjectComponent.Builder
- All Superinterfaces:
AbstractBuilder<ObjectComponent>, ComponentBuilder<ObjectComponent, ObjectComponent.Builder>, ComponentBuilderApplicable, ComponentLike, MutableStyleSetter<ObjectComponent.Builder>, StyleSetter<ObjectComponent.Builder>
- Enclosing interface:
ObjectComponent
public static sealed interface ObjectComponent.Builder
extends ComponentBuilder<ObjectComponent, ObjectComponent.Builder>
An object component builder.
- Since:
- 4.25.0
-
Method Summary
Modifier and TypeMethodDescriptioncontents(ObjectContents objectContents) Sets the contents of this object component builder.fallback(@Nullable ComponentLike fallback) Sets the fallback component of this object component builder.Methods inherited from interface ComponentBuilder
append, append, append, append, append, append, appendNewline, appendSpace, applicableApply, apply, applyDeep, asComponent, build, children, clickEvent, color, colorIfAbsent, componentBuilderApply, decorate, decorate, decoration, decoration, decorationIfAbsent, decorations, decorations, font, hoverEvent, insertion, mapChildren, mapChildrenDeep, mergeStyle, mergeStyle, mergeStyle, resetStyle, style, styleMethods inherited from interface StyleSetter
shadowColor, shadowColorIfAbsent
-
Method Details
-
contents
Sets the contents of this object component builder.- Parameters:
objectContents- the contents to set- Returns:
- this builder
- Since:
- 4.25.0
-
fallback
Sets the fallback component of this object component builder.The client displays this instead of this component in areas where object components are not supported, such as server MOTDs.
- Parameters:
fallback- the fallback component, ornullto clear the fallback- Returns:
- this builder
- Since:
- 5.0.0
- Since Minecraft:
- 26.1
-