Interface NBTComponentBuilder<C extends NBTComponent<C>, B extends NBTComponentBuilder<C,B>>
- Type Parameters:
C- component typeB- builder type
- All Superinterfaces:
AbstractBuilder<C>, ComponentBuilder<C,B>, ComponentBuilderApplicable, ComponentLike, MutableStyleSetter<B>, StyleSetter<B>
- All Known Subinterfaces:
BlockNBTComponent.Builder, EntityNBTComponent.Builder, StorageNBTComponent.Builder
public sealed interface NBTComponentBuilder<C extends NBTComponent<C>, B extends NBTComponentBuilder<C,B>>
extends ComponentBuilder<C,B>
permits BlockNBTComponent.Builder, EntityNBTComponent.Builder, StorageNBTComponent.Builder (not exhaustive)
An NBT component builder.
- Since:
- 4.0.0
-
Method Summary
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
-
nbtPath
-
interpret
Sets whether to interpret.This cannot be
trueifplain(boolean)is alsotrue.- Parameters:
interpret- if we should be interpreting- Returns:
- this builder
- Throws:
IllegalArgumentException- if set totrueandplain(boolean)is alsotrue- Since:
- 4.0.0
-
separator
Sets the separator.- Parameters:
separator- the separator- Returns:
- this builder
- Since:
- 4.8.0
-
plain
Sets if styling should be removed from pretty-printed NBT.This cannot be
trueifinterpret(boolean)is alsotrue.- Parameters:
plain- if styling should be removed when pretty-printed- Returns:
- this builder
- Throws:
IllegalArgumentException- if set totrueandinterpret(boolean)is alsotrue- Since:
- 5.0.0
- Since Minecraft:
- 26.1
-