Package net.minecraft.text
Class NbtText
java.lang.Object
net.minecraft.text.BaseText
net.minecraft.text.NbtText
- All Implemented Interfaces:
com.mojang.brigadier.Message
,MutableText
,ParsableText
,StringVisitable
,Text
- Direct Known Subclasses:
NbtText.BlockNbtText
,NbtText.EntityNbtText
,NbtText.StorageNbtText
public abstract class NbtText extends BaseText implements ParsableText
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NbtText.BlockNbtText
static class
NbtText.EntityNbtText
static class
NbtText.StorageNbtText
Nested classes/interfaces inherited from interface net.minecraft.text.StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>
Nested classes/interfaces inherited from interface net.minecraft.text.Text
Text.Serializer
-
Field Summary
Fields Modifier and Type Field Description protected boolean
interpret
private static Logger
LOGGER
protected NbtPathArgumentType.NbtPath
path
protected String
rawPath
Fields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT
-
Constructor Summary
Constructors Modifier Constructor Description NbtText(String rawPath, boolean interpret)
protected
NbtText(String rawPath, NbtPathArgumentType.NbtPath path, boolean interpret)
-
Method Summary
Modifier and Type Method Description String
getPath()
MutableText
parse(ServerCommandSource source, Entity sender, int depth)
private static NbtPathArgumentType.NbtPath
parsePath(String rawPath)
boolean
shouldInterpret()
protected abstract Stream<CompoundTag>
toNbt(ServerCommandSource source)
Methods inherited from class net.minecraft.text.BaseText
append, asOrderedText, asString, copy, equals, getSiblings, getStyle, hashCode, setStyle, shallowCopy, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
LOGGER
-
interpret
protected final boolean interpret -
rawPath
-
path
-
-
Constructor Details
-
NbtText
-
NbtText
-
-
Method Details
-
parsePath
-
toNbt
-
getPath
-
shouldInterpret
public boolean shouldInterpret() -
parse
public MutableText parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfaceParsableText
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-