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 Classes
    Modifier and Type
    Interface
    Description
    static class 
    A utility for easily providing any number of tags to a resource cache.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    default void
    Resets some state associated with sources registered to the resource cache.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • 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 generated
      context - 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

      default void reset(ResourceGenerationContext context)
      Description copied from interface: Resettable
      Resets some state associated with sources registered to the resource cache.
      Specified by:
      reset in interface Resettable