Class MutableLoadResult<T>
java.lang.Object
com.blamejared.crafttweaker.api.tag.MutableLoadResult<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<T>> tag) Adds a tag to theTagManager.LoadResultvoidBinds the givenTagManager.LoadResultto this object.net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> key()Gets the key of theTagManager.LoadResultnet.minecraft.tags.TagManager.LoadResult<T> result()Gets the internal result.Map<net.minecraft.resources.ResourceLocation, Collection<net.minecraft.core.Holder<T>>> tagMap()Gets the tags of theTagManager.LoadResult
-
Constructor Details
-
MutableLoadResult
public MutableLoadResult() -
MutableLoadResult
-
-
Method Details
-
addTag
public void addTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<T>> tag) Adds a tag to theTagManager.LoadResult- Parameters:
id- The id of the tag to add.tag- The tag to add.
-
key
Gets the key of theTagManager.LoadResult- Returns:
- The
ResourceKeyof the load result.
-
tagMap
public Map<net.minecraft.resources.ResourceLocation,Collection<net.minecraft.core.Holder<T>>> tagMap()Gets the tags of theTagManager.LoadResult- Returns:
- The tags of the load result.
-
result
Gets the internal result.- Returns:
- The internal result.
-
bind
Binds the givenTagManager.LoadResultto this object.This will also make the elements of all tags in this result mutable.
- Parameters:
result- TheTagManager.LoadResultto bind.
-