Class UnknownTagManager

java.lang.Object
com.blamejared.crafttweaker.api.tag.manager.type.UnknownTagManager
All Implemented Interfaces:
CommandStringDisplayable, ITagManager<UnknownTag>, Comparable<ITagManager<?>>, Iterable<UnknownTag>

@ZenRegister(loaders={"crafttweaker","tags"}) public class UnknownTagManager extends Object implements ITagManager<UnknownTag>
  • Constructor Details

    • UnknownTagManager

      public UnknownTagManager(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> resourceKey)
  • Method Details

    • resourceKey

      public net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> resourceKey()
      Description copied from interface: ITagManager
      Gets the resource key of the registry that this manager deals with.
      Specified by:
      resourceKey in interface ITagManager<UnknownTag>
      Returns:
      The resource key of the registry that this manager deals with.
    • addId

      public final void addId(UnknownTag to, net.minecraft.resources.ResourceLocation... values)
      Description copied from interface: ITagManager
      Adds the elements that correspond to the given ResourceLocation to the given tag.
      Specified by:
      addId in interface ITagManager<UnknownTag>
      Parameters:
      to - The tag to add to.
      values - The registry key of the elements to add.
    • removeId

      public final void removeId(UnknownTag from, net.minecraft.resources.ResourceLocation... values)
      Description copied from interface: ITagManager
      Removes the elements that correspond to the given ResourceLocation from the given tag.
      Specified by:
      removeId in interface ITagManager<UnknownTag>
      Parameters:
      from - The tag to remove from.
      values - The registry key of the elements to remove.
    • clear

      public void clear(UnknownTag from)
      Description copied from interface: ITagManager
      Clears all values of the given tag.
      Specified by:
      clear in interface ITagManager<UnknownTag>
      Parameters:
      from - The tag to clear.
    • tag

      public UnknownTag tag(String id)
      Description copied from interface: ITagManager
      Gets a tag with the given id.
      Specified by:
      tag in interface ITagManager<UnknownTag>
      Parameters:
      id - The id of the tag.
      Returns:
      A tag with the given id.
    • tag

      public UnknownTag tag(net.minecraft.resources.ResourceLocation id)
      Description copied from interface: ITagManager
      Gets a tag with the given id.
      Specified by:
      tag in interface ITagManager<UnknownTag>
      Parameters:
      id - The id of the tag.
      Returns:
      A tag with the given id.
    • recalculate

      public void recalculate()
      Description copied from interface: ITagManager
      Recalculates the cached tag map.
      Specified by:
      recalculate in interface ITagManager<UnknownTag>
    • tagMap

      public Map<net.minecraft.resources.ResourceLocation,UnknownTag> tagMap()
      Description copied from interface: ITagManager
      Gets a map of id to tag that this manager knows about.
      Specified by:
      tagMap in interface ITagManager<UnknownTag>
      Returns:
      a map of id to tag.
    • internalTags

      public Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<?>>> internalTags()
      Description copied from interface: ITagManager
      Gets the internal tags of this manager.
      Specified by:
      internalTags in interface ITagManager<UnknownTag>
      Returns:
      a map of id to tag.
    • getInternalRaw

      @Nullable public Collection<net.minecraft.core.Holder<?>> getInternalRaw(UnknownTag tag)
      Description copied from interface: ITagManager
      Gets the internal Collection<Holder> of the given tag.

      This method should only be used when you do not have access to the more specific version of this method in KnownTagManager

      Specified by:
      getInternalRaw in interface ITagManager<UnknownTag>
      Parameters:
      tag - The tag to get the internal value of.
      Returns:
      The internal Collection<Holder> of the given tag.
    • tagKeys

      public List<net.minecraft.resources.ResourceLocation> tagKeys()
      Description copied from interface: ITagManager
      Gets the keys of the tags that this manager knows about.
      Specified by:
      tagKeys in interface ITagManager<UnknownTag>
      Returns:
      A List of keys of the tags that this manager knows about.
    • addTag

      public <U> void addTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<U>> tag)
      Description copied from interface: ITagManager
      Adds a tag to this manager with the given id.
      Specified by:
      addTag in interface ITagManager<UnknownTag>
      Parameters:
      id - The id of the tag to add.
      tag - The tag to add
    • bind

      public void bind(net.minecraft.tags.TagManager.LoadResult<?> result)
      Description copied from interface: ITagManager
      Binds this manager to the given load result.

      This is usually storing the given TagManager.LoadResult into a MutableLoadResult which allows for easy mutation.

      Specified by:
      bind in interface ITagManager<UnknownTag>
      Parameters:
      result - The result to bind to.