Class NbtComponent

java.lang.Object
net.minecraft.network.chat.BaseComponent
net.minecraft.network.chat.NbtComponent
All Implemented Interfaces:
com.mojang.brigadier.Message, Component, ContextAwareComponent, FormattedText, MutableComponent
Direct Known Subclasses:
NbtComponent.BlockNbtComponent, NbtComponent.EntityNbtComponent, NbtComponent.StorageNbtComponent

public abstract class NbtComponent extends BaseComponent implements ContextAwareComponent
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • interpreting

      protected final boolean interpreting
    • separator

      protected final Optional<Component> separator
    • nbtPathPattern

      protected final String nbtPathPattern
    • compiledNbtPath

      @Nullable protected final NbtPathArgument.NbtPath compiledNbtPath
  • Constructor Details

  • Method Details

    • compileNbtPath

      @Nullable private static NbtPathArgument.NbtPath compileNbtPath(String p_130978_)
    • getData

      protected abstract Stream<CompoundTag> getData(CommandSourceStack p_130962_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getNbtPath

      public String getNbtPath()
    • isInterpreting

      public boolean isInterpreting()
    • resolve

      public MutableComponent resolve(@Nullable CommandSourceStack p_130964_, @Nullable Entity p_130965_, int p_130966_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      resolve in interface ContextAwareComponent
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException