Class FabricSoundsProvider
java.lang.Object
net.fabricmc.fabric.api.client.datagen.v1.provider.FabricSoundsProvider
- All Implemented Interfaces:
DataProvider
Extend this class and implement
configure(RegistryWrapper.WrapperLookup, SoundExporter).
Register an instance of the class with FabricDataGenerator.Pack.addProvider(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack.Factory<T>) in a DataGeneratorEntrypoint.
Registered sound types will be appended to their own sounds.json in a namespace corresponding to
the id of the sound event they are assigned to.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceNested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider> -
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionFabricSoundsProvider(DataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidconfigure(RegistryWrapper.WrapperLookup registryLookup, FabricSoundsProvider.SoundExporter exporter) Implement this method and then useBiConsumer.accept(T, U)to register sound events to be data-generated.run(DataWriter writer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.data.DataProvider
getName
-
Constructor Details
-
FabricSoundsProvider
public FabricSoundsProvider(DataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture)
-
-
Method Details
-
run
- Specified by:
runin interfaceDataProvider
-
configure
protected abstract void configure(RegistryWrapper.WrapperLookup registryLookup, FabricSoundsProvider.SoundExporter exporter) Implement this method and then useBiConsumer.accept(T, U)to register sound events to be data-generated.Registered sound types will be appended to their own sounds.json in a namespace corresponding to the id of the sound event they are assigned to.
-