java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.client.generators.TextureMetaGenerator
All Implemented Interfaces:
InputStreamSource, PathAwareInputStreamSource, ResourceGenerator

public class TextureMetaGenerator extends Object implements ResourceGenerator
A ResourceGenerator that generates a .mcmeta file for a texture by combining those of other textures and/or setting properties manually.
  • Field Details

  • Method Details

    • getAnimation

    • getVillager

    • getTexture

    • getOutputLocation

      public net.minecraft.resources.ResourceLocation getOutputLocation()
    • getSources

      public List<net.minecraft.resources.ResourceLocation> getSources()
    • persistentCacheData

      public <T> @NonNull com.mojang.serialization.DataResult<T> persistentCacheData(com.mojang.serialization.DynamicOps<T> ops, net.minecraft.resources.ResourceLocation location, ResourceGenerationContext context)
      Description copied from interface: ResourceGenerator
      Create a key that can be uniquely used to identify the resource this generator will generate. 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.
      Specified by:
      persistentCacheData in interface ResourceGenerator
      Parameters:
      ops - DynamicOps to encode the unique key with.
      location - 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
    • get

      public @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> get(net.minecraft.resources.ResourceLocation outRl, ResourceGenerationContext context)
      Description copied from interface: InputStreamSource
      Gets an input stream for the given resource location.
      Specified by:
      get in interface InputStreamSource
      Parameters:
      outRl - ResourceLocation to get the input stream for.
      context - ResourceGenerationContext containing information about when and where the resource is being generated.
      Returns:
      Supplier for an InputStream for the location. Should be null if the resource cannot be loaded.
    • getLocations

      public @NonNull Set<net.minecraft.resources.ResourceLocation> getLocations(ResourceGenerationContext context)
      Specified by:
      getLocations in interface PathAwareInputStreamSource
      Returns:
      the locations that this InputStreamSource can provide resources at.
    • codec

      public com.mojang.serialization.MapCodec<? extends ResourceGenerator> codec()
      Specified by:
      codec in interface ResourceGenerator
      Returns:
      A codec that can serialize this resource generator.