Class NBTTextComponent

java.lang.Object
net.minecraft.util.text.TextComponent
net.minecraft.util.text.NBTTextComponent
All Implemented Interfaces:
com.mojang.brigadier.Message, IFormattableTextComponent, ITargetedTextComponent, ITextComponent, ITextProperties
Direct Known Subclasses:
NBTTextComponent.Block, NBTTextComponent.Entity, NBTTextComponent.Storage

public abstract class NBTTextComponent extends TextComponent implements ITargetedTextComponent
  • Field Details

    • LOGGER

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

      protected final boolean interpreting
    • nbtPathPattern

      protected final String nbtPathPattern
    • compiledNbtPath

      @Nullable protected final NBTPathArgument.NBTPath compiledNbtPath
  • Constructor Details

    • NBTTextComponent

      public NBTTextComponent(String p_i50781_1_, boolean p_i50781_2_)
    • NBTTextComponent

      protected NBTTextComponent(String p_i50782_1_, @Nullable NBTPathArgument.NBTPath p_i50782_2_, boolean p_i50782_3_)
  • Method Details

    • compileNbtPath

      @Nullable private static NBTPathArgument.NBTPath compileNbtPath(String p_218672_0_)
    • getData

      protected abstract Stream<CompoundNBT> getData(CommandSource p_218673_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getNbtPath

      public String getNbtPath()
    • isInterpreting

      public boolean isInterpreting()
    • resolve

      public IFormattableTextComponent resolve(@Nullable CommandSource p_230535_1_, @Nullable Entity p_230535_2_, int p_230535_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      resolve in interface ITargetedTextComponent
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException