Class AbstractComponentRenderer<C>
java.lang.Object
net.kyori.adventure.text.renderer.AbstractComponentRenderer<C>
- Type Parameters:
C- the context type
- All Implemented Interfaces:
ComponentRenderer<C>
- Direct Known Subclasses:
TranslatableComponentRenderer
An abstract implementation of a component renderer.
Note: new renderX methods without default implementations may be
added at any time with the addition of new component types into Minecraft.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRenders a component.protected final ComponentRenders a component.protected abstract ComponentrenderBlockNbt(BlockNBTComponent component, C context) Renders a block NBT component.protected abstract ComponentrenderEntityNbt(EntityNBTComponent component, C context) Renders an entity NBT component.protected abstract ComponentrenderKeybind(KeybindComponent component, C context) Renders a keybind component.protected abstract ComponentrenderObject(ObjectComponent component, C context) Renders an object component.protected abstract ComponentrenderScore(ScoreComponent component, C context) Renders a score component.protected abstract ComponentrenderSelector(SelectorComponent component, C context) Renders a selector component.protected abstract ComponentrenderStorageNbt(StorageNBTComponent component, C context) Renders a storage NBT component.protected abstract ComponentrenderText(TextComponent component, C context) Renders a text component.protected abstract ComponentrenderTranslatable(TranslatableComponent component, C context) Renders a translatable component.protected ComponentrenderVirtual(VirtualComponent component, C context) Renders a virtual component.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComponentRenderer
mapContext
-
Constructor Details
-
AbstractComponentRenderer
public AbstractComponentRenderer()Constructs a new abstract component renderer.- Since:
- 4.0.0
-
-
Method Details
-
render
Renders a component.This method exists to delegate calls to the protected
render(Component, Object, boolean)method withskipVirtualset tofalse.- Specified by:
renderin interfaceComponentRenderer<C>- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
render
-
renderObject
Renders an object component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 5.0.0
-
renderBlockNbt
Renders a block NBT component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderEntityNbt
Renders an entity NBT component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderStorageNbt
Renders a storage NBT component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderKeybind
Renders a keybind component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderScore
Renders a score component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderSelector
Renders a selector component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderText
Renders a text component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
renderVirtual
Renders a virtual component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.18.0
-
renderTranslatable
Renders a translatable component.- Parameters:
component- the componentcontext- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-