Class DynamicTextureProvider

java.lang.Object
codechicken.lib.datagen.DynamicTextureProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider

public class DynamicTextureProvider extends Object implements net.minecraft.data.DataProvider
This provider can be used to create a data generator that can generate various textures programmatically. The primary function is to convert dynamically resized textures into new fixed size textures.

Created by brandon3055 on 07/09/2023

  • Nested Class Summary

    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

    FIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicTextureProvider(net.minecraft.data.DataGenerator gen, net.minecraftforge.common.data.ExistingFileHelper fileHelper, String modid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDynamicTexture(String dynamicInput, String outputTexture, int width, int height, int border)
     
    void
    addDynamicTexture(String dynamicInput, String outputTexture, int width, int height, int topBorder, int leftBorder, int bottomBorder, int rightBorder)
     
    void
    addDynamicTexture(net.minecraft.resources.ResourceLocation dynamicInput, net.minecraft.resources.ResourceLocation outputTexture, int width, int height, int border)
     
    void
    addDynamicTexture(net.minecraft.resources.ResourceLocation dynamicInput, net.minecraft.resources.ResourceLocation outputTexture, int width, int height, int topBorder, int leftBorder, int bottomBorder, int rightBorder)
     
    void
     
    void
    If you are extending this provider, then override this method to add your textures.
     
    run(net.minecraft.data.CachedOutput writer)
     

    Methods inherited from class java.lang.Object

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

    • DynamicTextureProvider

      public DynamicTextureProvider(net.minecraft.data.DataGenerator gen, net.minecraftforge.common.data.ExistingFileHelper fileHelper, String modid)
  • Method Details

    • addTextures

      public void addTextures()
      If you are extending this provider, then override this method to add your textures.
    • addDynamicTextures

      public void addDynamicTextures(DynamicTextures dynamicTextures)
    • addDynamicTexture

      public void addDynamicTexture(String dynamicInput, String outputTexture, int width, int height, int border)
    • addDynamicTexture

      public void addDynamicTexture(String dynamicInput, String outputTexture, int width, int height, int topBorder, int leftBorder, int bottomBorder, int rightBorder)
    • addDynamicTexture

      public void addDynamicTexture(net.minecraft.resources.ResourceLocation dynamicInput, net.minecraft.resources.ResourceLocation outputTexture, int width, int height, int border)
    • addDynamicTexture

      public void addDynamicTexture(net.minecraft.resources.ResourceLocation dynamicInput, net.minecraft.resources.ResourceLocation outputTexture, int width, int height, int topBorder, int leftBorder, int bottomBorder, int rightBorder)
    • run

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

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