Class NbtContents
java.lang.Object
net.minecraft.network.chat.contents.NbtContents
- All Implemented Interfaces:
ComponentContents
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.chat.ComponentContents
ComponentContents.Type<T extends ComponentContents>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<NbtContents> protected final NbtPathArgument.NbtPath
private final DataSource
private final boolean
private static final org.slf4j.Logger
private final String
static final ComponentContents.Type
<NbtContents> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNbtContents
(String nbtPathPattern, boolean interpreting, Optional<Component> separator, DataSource dataSource) private
NbtContents
(String nbtPathPattern, NbtPathArgument.NbtPath compiledNbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource) -
Method Summary
Modifier and TypeMethodDescriptionprivate static NbtPathArgument.NbtPath
compileNbtPath
(String nbtPathPattern) boolean
int
hashCode()
boolean
resolve
(CommandSourceStack nbtPathPattern, Entity entity, int recursionDepth) toString()
type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.chat.ComponentContents
visit, visit
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
TYPE
-
interpreting
private final boolean interpreting -
separator
-
nbtPathPattern
-
dataSource
-
compiledNbtPath
-
-
Constructor Details
-
NbtContents
public NbtContents(String nbtPathPattern, boolean interpreting, Optional<Component> separator, DataSource dataSource) -
NbtContents
private NbtContents(String nbtPathPattern, @Nullable NbtPathArgument.NbtPath compiledNbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource)
-
-
Method Details
-
compileNbtPath
-
getNbtPath
-
isInterpreting
public boolean isInterpreting() -
getSeparator
-
getDataSource
-
equals
-
hashCode
public int hashCode() -
toString
-
resolve
public MutableComponent resolve(@Nullable CommandSourceStack nbtPathPattern, @Nullable Entity entity, int recursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolve
in interfaceComponentContents
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
type
- Specified by:
type
in interfaceComponentContents
-