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 classNbtText.BlockNbtTextstatic classNbtText.EntityNbtTextstatic classNbtText.StorageNbtTextNested 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 booleaninterpretprivate static LoggerLOGGERprotected NbtPathArgumentType.NbtPathpathprotected StringrawPathFields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT -
Constructor Summary
Constructors Modifier Constructor Description NbtText(String rawPath, boolean interpret)protectedNbtText(String rawPath, NbtPathArgumentType.NbtPath path, boolean interpret) -
Method Summary
Modifier and Type Method Description StringgetPath()MutableTextparse(ServerCommandSource source, Entity sender, int depth)private static NbtPathArgumentType.NbtPathparsePath(String rawPath)booleanshouldInterpret()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, toStringMethods 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:
parsein interfaceParsableText- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-