Class TextureGenerator

java.lang.Object
dev.jaxydog.astral.datagen.TextureGenerator
All Implemented Interfaces:
net.minecraft.data.DataProvider

public class TextureGenerator extends Object implements net.minecraft.data.DataProvider
Provides a simple data generation API for textures.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An instance of a texture generator.

    Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider

    net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider>
  • Field Summary

    Fields inherited from interface net.minecraft.data.DataProvider

    JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextureGenerator(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack pack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    generate(net.minecraft.registry.RegistryKey<? extends net.minecraft.registry.Registry<T>> registryKey, Consumer<TextureGenerator.Instance<T>> consumer)
    Generates a new texture.
    static @NotNull TextureGenerator
     
     
    run(net.minecraft.data.DataWriter writer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextureGenerator

      public TextureGenerator(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack pack)
  • Method Details

    • getInstance

      @NotNull public static @NotNull TextureGenerator getInstance()
    • generate

      public <T> void generate(net.minecraft.registry.RegistryKey<? extends net.minecraft.registry.Registry<T>> registryKey, Consumer<TextureGenerator.Instance<T>> consumer)
      Generates a new texture.
      Type Parameters:
      T - The registry's associated type.
      Parameters:
      registryKey - The target registry.
      consumer - A consumer that takes in the generator instance.
    • getName

      public String getName()
      Specified by:
      getName in interface net.minecraft.data.DataProvider
    • run

      public CompletableFuture<?> run(net.minecraft.data.DataWriter writer)
      Specified by:
      run in interface net.minecraft.data.DataProvider