Package net.minecraft.network.chat
Class NbtComponent
java.lang.Object
net.minecraft.network.chat.BaseComponent
net.minecraft.network.chat.NbtComponent
- All Implemented Interfaces:
com.mojang.brigadier.Message,Component,ContextAwareComponent,FormattedText,MutableComponent
- Direct Known Subclasses:
NbtComponent.BlockNbtComponent,NbtComponent.EntityNbtComponent,NbtComponent.StorageNbtComponent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classNested classes/interfaces inherited from interface net.minecraft.network.chat.Component
Component.SerializerNested classes/interfaces inherited from interface net.minecraft.network.chat.FormattedText
FormattedText.ContentConsumer<T>, FormattedText.StyledContentConsumer<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NbtPathArgument.NbtPathprotected final booleanprivate static final org.slf4j.Loggerprotected final StringFields inherited from class net.minecraft.network.chat.BaseComponent
siblingsFields inherited from interface net.minecraft.network.chat.FormattedText
EMPTY, STOP_ITERATION -
Constructor Summary
ConstructorsModifierConstructorDescriptionNbtComponent(String p_178454_, boolean p_178455_, Optional<Component> p_178456_) protectedNbtComponent(String p_178449_, NbtPathArgument.NbtPath p_178450_, boolean p_178451_, Optional<Component> p_178452_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static NbtPathArgument.NbtPathcompileNbtPath(String p_130978_) protected abstract Stream<CompoundTag>getData(CommandSourceStack p_130962_) booleanresolve(CommandSourceStack p_130964_, Entity p_130965_, int p_130966_) Methods inherited from class net.minecraft.network.chat.BaseComponent
append, copy, equals, getContents, getSiblings, getStyle, getVisualOrderText, hashCode, plainCopy, setStyle, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
interpreting
protected final boolean interpreting -
separator
-
nbtPathPattern
-
compiledNbtPath
-
-
Constructor Details
-
NbtComponent
-
NbtComponent
protected NbtComponent(String p_178449_, @Nullable NbtPathArgument.NbtPath p_178450_, boolean p_178451_, Optional<Component> p_178452_)
-
-
Method Details
-
compileNbtPath
-
getData
protected abstract Stream<CompoundTag> getData(CommandSourceStack p_130962_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getNbtPath
-
isInterpreting
public boolean isInterpreting() -
resolve
public MutableComponent resolve(@Nullable CommandSourceStack p_130964_, @Nullable Entity p_130965_, int p_130966_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolvein interfaceContextAwareComponent- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-