Interface TagSupplier
- All Superinterfaces:
Function<ResourceGenerationContext,,Map<net.minecraft.resources.ResourceLocation, Set<net.minecraft.resources.ResourceLocation>>> Resettable
- All Known Implementing Classes:
TagSupplier.TagBakery
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface TagSupplier
extends Function<ResourceGenerationContext,Map<net.minecraft.resources.ResourceLocation,Set<net.minecraft.resources.ResourceLocation>>>, Resettable
Can supplier a map of tags to contents given a generation context
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA utility for easily providing any number of tags to a resource cache. -
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable StringcreateSupplierCacheKey(net.minecraft.resources.ResourceLocation outRl, ResourceGenerationContext context) Create a key that can be uniquely used to identify the tag map to be generated.default voidreset(ResourceGenerationContext context) Resets some state associated with sources registered to the resource cache.
-
Method Details
-
createSupplierCacheKey
default @Nullable String createSupplierCacheKey(net.minecraft.resources.ResourceLocation outRl, ResourceGenerationContext context) Create a key that can be uniquely used to identify the tag map to be generated. Note that this is used for caching across reloads, and so should incorporate any resources that may be used to generate the resource. If this is not possible, return null.- Parameters:
outRl- the resource location that will be generatedcontext- the context that the resource will be generated in. Resources can safely be accessed in this context- Returns:
- a key that can be used to uniquely identify the resource, or null if this is not possible
-
reset
Description copied from interface:ResettableResets some state associated with sources registered to the resource cache.- Specified by:
resetin interfaceResettable
-