Class ArtifactDocsProvider

java.lang.Object
com.binaris.wizardry.datagen.provider.ArtifactDocsProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider
Direct Known Subclasses:
EBArtifactDocsProvider

public abstract class ArtifactDocsProvider extends Object implements net.minecraft.data.DataProvider
Base data provider for generating a Markdown table with all the artifacts registered in the mod, including item sprite, artifact name and description. This is made specially to be used for VitePress documentation.
  • 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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ArtifactDocsProvider(net.minecraft.data.PackOutput output, String modId, String iconBasePath)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    buildArtifacts(@NotNull Consumer<net.minecraft.world.item.Item> consumer)
     
    @NotNull String
     
    @NotNull CompletableFuture<?>
    run(@NotNull net.minecraft.data.CachedOutput cachedOutput)
     
    protected String
    Translates a key to its localized value.

    Methods inherited from class java.lang.Object

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

    • ArtifactDocsProvider

      protected ArtifactDocsProvider(net.minecraft.data.PackOutput output, String modId, String iconBasePath)
  • Method Details

    • buildArtifacts

      protected abstract void buildArtifacts(@NotNull @NotNull Consumer<net.minecraft.world.item.Item> consumer)
    • run

      @NotNull public @NotNull CompletableFuture<?> run(@NotNull @NotNull net.minecraft.data.CachedOutput cachedOutput)
      Specified by:
      run in interface net.minecraft.data.DataProvider
    • translate

      protected String translate(String key)
      Translates a key to its localized value. If the key is not found, returns the key itself.
      Parameters:
      key - The translation key
      Returns:
      The translated string, or the key if not found
    • getName

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