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.NbtPathprivate final DataSourceprivate final booleanprivate static final org.slf4j.Loggerprivate final Stringstatic final ComponentContents.Type<NbtContents> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNbtContents(String p_237395_, boolean p_237396_, Optional<Component> p_237397_, DataSource p_237398_) privateNbtContents(String pNbtPathPattern, NbtPathArgument.NbtPath pCompiledNbtPath, boolean pInterpreting, Optional<Component> pSeparator, DataSource pDataSource) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringprivate static NbtPathArgument.NbtPathcompileNbtPath(String pNbtPathPattern) booleaninthashCode()booleanresolve(CommandSourceStack pNbtPathPattern, Entity pEntity, int pRecursionDepth) toString()type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 p_237395_, boolean p_237396_, Optional<Component> p_237397_, DataSource p_237398_) -
NbtContents
private NbtContents(String pNbtPathPattern, @Nullable NbtPathArgument.NbtPath pCompiledNbtPath, boolean pInterpreting, Optional<Component> pSeparator, DataSource pDataSource)
-
-
Method Details
-
compileNbtPath
-
getNbtPath
-
isInterpreting
public boolean isInterpreting() -
getSeparator
-
getDataSource
-
equals
-
hashCode
public int hashCode() -
toString
-
resolve
public MutableComponent resolve(@Nullable CommandSourceStack pNbtPathPattern, @Nullable Entity pEntity, int pRecursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
resolvein interfaceComponentContents- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
asString
-
type
- Specified by:
typein interfaceComponentContents
-