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 Summary
ConstructorsConstructorDescriptionUnknownTagManager(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> resourceKey) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddId(UnknownTag to, net.minecraft.resources.ResourceLocation... values) Adds the elements that correspond to the givenResourceLocationto the given tag.<U> voidaddTag(net.minecraft.resources.ResourceLocation id, Collection<net.minecraft.core.Holder<U>> tag) Adds a tag to this manager with the given id.voidbind(net.minecraft.tags.TagManager.LoadResult<?> result) Binds this manager to the given load result.voidclear(UnknownTag from) Clears all values of the given tag.Collection<net.minecraft.core.Holder<?>> getInternalRaw(UnknownTag tag) Map<net.minecraft.resources.ResourceLocation, Collection<net.minecraft.core.Holder<?>>> Gets the internal tags of this manager.voidRecalculates the cached tag map.final voidremoveId(UnknownTag from, net.minecraft.resources.ResourceLocation... values) Removes the elements that correspond to the givenResourceLocationfrom the given tag.net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> Gets the resource key of the registry that this manager deals with.Gets a tag with the given id.tag(net.minecraft.resources.ResourceLocation id) Gets a tag with the given id.List<net.minecraft.resources.ResourceLocation> tagKeys()Gets the keys of the tags that this manager knows about.Map<net.minecraft.resources.ResourceLocation, UnknownTag> tagMap()Gets a map of id to tag that this manager knows about.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.tag.manager.ITagManager
compareTo, elementClass, exists, exists, exists, getCommandString, getTagsFor, idElements, iterator, tag, tagFolder, tagsMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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:ITagManagerGets the resource key of the registry that this manager deals with.- Specified by:
resourceKeyin interfaceITagManager<UnknownTag>- Returns:
- The resource key of the registry that this manager deals with.
-
addId
Description copied from interface:ITagManagerAdds the elements that correspond to the givenResourceLocationto the given tag.- Specified by:
addIdin interfaceITagManager<UnknownTag>- Parameters:
to- The tag to add to.values- The registry key of the elements to add.
-
removeId
Description copied from interface:ITagManagerRemoves the elements that correspond to the givenResourceLocationfrom the given tag.- Specified by:
removeIdin interfaceITagManager<UnknownTag>- Parameters:
from- The tag to remove from.values- The registry key of the elements to remove.
-
clear
Description copied from interface:ITagManagerClears all values of the given tag.- Specified by:
clearin interfaceITagManager<UnknownTag>- Parameters:
from- The tag to clear.
-
tag
Description copied from interface:ITagManagerGets a tag with the given id.- Specified by:
tagin interfaceITagManager<UnknownTag>- Parameters:
id- The id of the tag.- Returns:
- A tag with the given id.
-
tag
Description copied from interface:ITagManagerGets a tag with the given id.- Specified by:
tagin interfaceITagManager<UnknownTag>- Parameters:
id- The id of the tag.- Returns:
- A tag with the given id.
-
recalculate
public void recalculate()Description copied from interface:ITagManagerRecalculates the cached tag map.- Specified by:
recalculatein interfaceITagManager<UnknownTag>
-
tagMap
Description copied from interface:ITagManagerGets a map of id to tag that this manager knows about.- Specified by:
tagMapin interfaceITagManager<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:ITagManagerGets the internal tags of this manager.- Specified by:
internalTagsin interfaceITagManager<UnknownTag>- Returns:
- a map of id to tag.
-
getInternalRaw
Description copied from interface:ITagManagerGets the internalCollectioninvalid input: '<'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:
getInternalRawin interfaceITagManager<UnknownTag>- Parameters:
tag- The tag to get the internal value of.- Returns:
- The internal
Collectioninvalid input: '<'Holder> of the given tag.
-
tagKeys
Description copied from interface:ITagManagerGets the keys of the tags that this manager knows about.- Specified by:
tagKeysin interfaceITagManager<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:ITagManagerAdds a tag to this manager with the given id.- Specified by:
addTagin interfaceITagManager<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:ITagManagerBinds this manager to the given load result.This is usually storing the given
TagManager.LoadResultinto aMutableLoadResultwhich allows for easy mutation.- Specified by:
bindin interfaceITagManager<UnknownTag>- Parameters:
result- The result to bind to.
-