Class MutableLoadResult<T>

java.lang.Object
com.blamejared.crafttweaker.api.tag.MutableLoadResult<T>

public class MutableLoadResult<T> extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    MutableLoadResult(net.minecraft.tags.TagManager.LoadResult<T> result)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<T>> tag)
    Adds a tag to the TagManager.LoadResult
    void
    bind(net.minecraft.tags.TagManager.LoadResult<T> result)
    Binds the given TagManager.LoadResult to this object.
    net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    key()
    Gets the key of the TagManager.LoadResult
    net.minecraft.tags.TagManager.LoadResult<T>
    Gets the internal result.
    Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<T>>>
    Gets the tags of the TagManager.LoadResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MutableLoadResult

      public MutableLoadResult()
    • MutableLoadResult

      public MutableLoadResult(net.minecraft.tags.TagManager.LoadResult<T> result)
  • Method Details

    • addTag

      public void addTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<T>> tag)
      Adds a tag to the TagManager.LoadResult
      Parameters:
      id - The id of the tag to add.
      tag - The tag to add.
    • key

      public net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> key()
      Gets the key of the TagManager.LoadResult
      Returns:
      The ResourceKey of the load result.
    • tagMap

      public Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<T>>> tagMap()
      Gets the tags of the TagManager.LoadResult
      Returns:
      The tags of the load result.
    • result

      public net.minecraft.tags.TagManager.LoadResult<T> result()
      Gets the internal result.
      Returns:
      The internal result.
    • bind

      public void bind(net.minecraft.tags.TagManager.LoadResult<T> result)
      Binds the given TagManager.LoadResult to this object.

      This will also make the elements of all tags in this result mutable.

      Parameters:
      result - The TagManager.LoadResult to bind.