Class NbtContents
java.lang.Object
net.minecraft.network.chat.contents.NbtContents
- All Implemented Interfaces:
ComponentContents
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @Nullable NbtPathArgument.NbtPathprivate final DataSourceprivate final booleanprivate static final org.slf4j.Loggerstatic final com.mojang.serialization.MapCodec<NbtContents> private final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionNbtContents(String nbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource) privateNbtContents(String nbtPathPattern, @Nullable NbtPathArgument.NbtPath compiledNbtPath, boolean interpreting, Optional<Component> separator, DataSource dataSource) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<NbtContents> codec()private static @Nullable NbtPathArgument.NbtPathcompileNbtPath(String path) booleaninthashCode()booleanresolve(@Nullable CommandSourceStack source, @Nullable Entity entity, int recursionDepth) toString()Methods inherited from interface ComponentContents
visit, visit
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAP_CODEC
-
interpreting
private final boolean interpreting -
separator
-
nbtPathPattern
-
dataSource
-
compiledNbtPath
-
-
Constructor Details
-
NbtContents
public NbtContents(String nbtPath, 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
-
toString
-
resolve
public MutableComponent resolve(@Nullable CommandSourceStack source, @Nullable Entity entity, int recursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolvein interfaceComponentContents- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
codec
- Specified by:
codecin interfaceComponentContents
-