Class GenerateSoundsJson

java.lang.Object
etithespirit.orimod.datagen.audio.GenerateSoundsJson
All Implemented Interfaces:
net.minecraft.data.DataProvider

public final class GenerateSoundsJson extends Object implements net.minecraft.data.DataProvider
A custom and rather hacky "data generator" (not in the traditional Minecraft sense!) that generates sounds.json based on some completely custom and arbitrary tomfoolery. The actual reason is that I change and add sounds a LOT. And this mod has a lot of sounds (it makes up most of the mod's size!) so being able to quickly organize and track down sounds in the corresponding directories rather than a huge mishmash of everything at once is very useful.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final net.minecraftforge.common.data.ExistingFileHelper.ResourceType
     

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, KEY_COMPARATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    GenerateSoundsJson(String modid, String srcFolder)
    Create a sound json generator for the given mod using the given source folder for the repository.
    GenerateSoundsJson(String modid, String srcFolder, String mainFolderName, String generatedFolderName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a name for this provider, to use in logging.
    void
    run(net.minecraft.data.CachedOutput pCache)
     

    Methods inherited from class java.lang.Object

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

    • SOUND

      protected static final net.minecraftforge.common.data.ExistingFileHelper.ResourceType SOUND
  • Constructor Details

    • GenerateSoundsJson

      public GenerateSoundsJson(String modid, String srcFolder)
      Create a sound json generator for the given mod using the given source folder for the repository.
      Parameters:
      modid - The ID of the mod to generate for.
      srcFolder - The source folder. For obvious reasons, this is only usable in an IDE.
    • GenerateSoundsJson

      public GenerateSoundsJson(String modid, String srcFolder, String mainFolderName, String generatedFolderName)
  • Method Details

    • run

      public void run(@Nonnull net.minecraft.data.CachedOutput pCache)
      Specified by:
      run in interface net.minecraft.data.DataProvider
    • getName

      @Nonnull public String getName()
      Gets a name for this provider, to use in logging.
      Specified by:
      getName in interface net.minecraft.data.DataProvider