Package net.kyori.adventure.text
Interface ObjectComponent
- All Superinterfaces:
Buildable<ObjectComponent,,ObjectComponent.Builder> BuildableComponent<ObjectComponent,,ObjectComponent.Builder> Component,ComponentBuilderApplicable,ComponentLike,net.kyori.examination.Examinable,HoverEventSource<Component>,ScopedComponent<ObjectComponent>,StyleGetter,StyleSetter<Component>
public interface ObjectComponent
extends BuildableComponent<ObjectComponent,ObjectComponent.Builder>, ScopedComponent<ObjectComponent>
Displays a sprite based on an atlas and sprite key.
- Since:
- 4.25.0
- Since Minecraft:
- 1.21.9
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn object component builder. -
Field Summary
Fields inherited from interface net.kyori.adventure.text.Component
EQUALS, EQUALS_IDENTITY, IS_NOT_EMPTY -
Method Summary
Modifier and TypeMethodDescription@Nullable Keyatlas()Gets the atlas key.@NotNull ObjectComponentCreates a copy of this object component with a new atlas key.default @NotNull Stream<? extends net.kyori.examination.ExaminableProperty>@NotNull Keysprite()Gets the sprite key.@NotNull ObjectComponentCreates a copy of this object component with a new sprite key.Methods inherited from interface net.kyori.adventure.text.BuildableComponent
toBuilderMethods inherited from interface net.kyori.adventure.text.Component
asHoverEvent, children, clickEvent, color, compact, componentBuilderApply, contains, contains, decoration, decorations, detectCycle, font, hasDecoration, hasStyling, hoverEvent, insertion, iterable, iterable, iterator, iterator, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, shadowColor, spliterator, spliterator, styleMethods inherited from interface net.kyori.examination.Examinable
examinableName, examineMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface net.kyori.adventure.text.ScopedComponent
append, append, append, append, append, appendNewline, appendSpace, applyFallbackStyle, applyFallbackStyle, asComponent, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, decorationIfAbsent, decorations, font, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, shadowColor, shadowColorIfAbsent, style, style, style, styleMethods inherited from interface net.kyori.adventure.text.format.StyleSetter
decorate, decorations
-
Method Details
-
atlas
Gets the atlas key.When null, the default atlas key is used by the client, currently
minecraft:blocks.- Returns:
- the atlas key or null
- Since:
- 4.25.0
-
sprite
Gets the sprite key.- Returns:
- the sprite key
- Since:
- 4.25.0
-
atlas
Creates a copy of this object component with a new atlas key.- Parameters:
atlas- the atlas key, or null for the default- Returns:
- a new object component
- Since:
- 4.25.0
-
sprite
Creates a copy of this object component with a new sprite key.- Parameters:
sprite- the sprite key- Returns:
- a new object component
- Since:
- 4.25.0
-
examinableProperties
@NotNull default @NotNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()- Specified by:
examinablePropertiesin interfaceComponent- Specified by:
examinablePropertiesin interfacenet.kyori.examination.Examinable
-