Class FabricSoundProvider

java.lang.Object
io.github.vampirestudios.vampirelib.api.FabricSoundProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider

public abstract class FabricSoundProvider extends Object implements net.minecraft.data.DataProvider

Register an instance of the class with FabricDataGenerator.addProvider(java.util.function.Function<net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator, P>) in a DataGeneratorEntrypoint

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
     
    protected final String
     

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, KEY_COMPARATOR
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FabricSoundProvider(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator dataGenerator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected abstract void
    Registers all sound instances to be generated.
    void
    run(@NotNull net.minecraft.data.CachedOutput cache)
     

    Methods inherited from class java.lang.Object

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

    • dataGenerator

      protected final net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator dataGenerator
    • modId

      protected final String modId
  • Constructor Details

    • FabricSoundProvider

      protected FabricSoundProvider(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator dataGenerator)
  • Method Details

    • registerSounds

      protected abstract void registerSounds(Consumer<SoundDefinition> registry)
      Registers all sound instances to be generated.
      Parameters:
      registry - The registry to validate and create files
    • run

      public void run(@NotNull @NotNull net.minecraft.data.CachedOutput cache) throws IOException
      Specified by:
      run in interface net.minecraft.data.DataProvider
      Throws:
      IOException
    • getName

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