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
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from interface net.minecraft.network.chat.Component
Component.Serializer
Nested classes/interfaces inherited from interface net.minecraft.network.chat.FormattedText
FormattedText.ContentConsumer<T>, FormattedText.StyledContentConsumer<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected NbtPathArgument.NbtPath
protected boolean
private static org.apache.logging.log4j.Logger
protected String
Fields inherited from class net.minecraft.network.chat.BaseComponent
siblings
Fields inherited from interface net.minecraft.network.chat.FormattedText
EMPTY, STOP_ITERATION
-
Constructor Summary
ModifierConstructorDescriptionNbtComponent(String p_178454_, boolean p_178455_, Optional<Component> p_178456_)
protected
NbtComponent(String p_178449_, NbtPathArgument.NbtPath p_178450_, boolean p_178451_, Optional<Component> p_178452_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate static NbtPathArgument.NbtPath
compileNbtPath(String p_130978_)
protected abstract Stream<CompoundTag>
getData(CommandSourceStack p_130962_)
boolean
resolve(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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.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:
resolve
in interfaceContextAwareComponent
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-