Class CartSoundProvider
java.lang.Object
com.mrbysco.chowderexpress.datagen.assets.CartSoundProvider
- All Implemented Interfaces:
net.minecraft.data.DataProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
net.minecraft.data.DataProvider.Factory<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.fabricmc.fabric.api.datagen.v1.FabricPackOutputFields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionCartSoundProvider(net.fabricmc.fabric.api.datagen.v1.FabricPackOutput dataOutput) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(String soundEvent, SoundDefinition definition) Adds theSoundEventwith the specified name along with itsSoundDefinitionto the list.protected voidadd(Supplier<net.minecraft.sounds.SoundEvent> soundEvent, SoundDefinition definition) Adds the entry name associated with the suppliedSoundEventwith the givenSoundDefinitionto the list.protected voidadd(net.minecraft.resources.Identifier soundEvent, SoundDefinition definition) protected voidadd(net.minecraft.sounds.SoundEvent soundEvent, SoundDefinition definition) Adds the entry name associated with the givenSoundEventwith theSoundDefinitionto the list.protected static SoundDefinitionCreates a newSoundDefinition, which will host a set ofSoundDefinition.Sounds and the necessary parameters.getName()modSubtitle(net.minecraft.resources.Identifier id) voidRegisters the sound definitions that should be generated via one of theaddmethods.run(net.minecraft.data.CachedOutput cache) protected static SoundDefinition.Soundsound(net.minecraft.resources.Identifier name) Creates a new sound with the given name andSoundDefinition.SoundType.SOUNDas sound type.protected static SoundDefinition.Soundsound(net.minecraft.resources.Identifier name, SoundDefinition.SoundType type) Creates a new sound with the given name and type.
-
Field Details
-
dataOutput
protected final net.fabricmc.fabric.api.datagen.v1.FabricPackOutput dataOutput
-
-
Constructor Details
-
CartSoundProvider
public CartSoundProvider(net.fabricmc.fabric.api.datagen.v1.FabricPackOutput dataOutput)
-
-
Method Details
-
registerSounds
public void registerSounds()Registers the sound definitions that should be generated via one of theaddmethods. -
modSubtitle
-
run
- Specified by:
runin interfacenet.minecraft.data.DataProvider
-
getName
- Specified by:
getNamein interfacenet.minecraft.data.DataProvider
-
definition
Creates a newSoundDefinition, which will host a set ofSoundDefinition.Sounds and the necessary parameters. -
sound
protected static SoundDefinition.Sound sound(net.minecraft.resources.Identifier name, SoundDefinition.SoundType type) Creates a new sound with the given name and type.- Parameters:
name- The name of the sound to create.type- The type of sound to create.
-
sound
Creates a new sound with the given name andSoundDefinition.SoundType.SOUNDas sound type.- Parameters:
name- The name of the sound to create.
-
add
protected void add(Supplier<net.minecraft.sounds.SoundEvent> soundEvent, SoundDefinition definition) Adds the entry name associated with the suppliedSoundEventwith the givenSoundDefinitionto the list.This method should be preferred when dealing with a
RegistryObjectorRegistryDelegate.- Parameters:
soundEvent- ASupplierfor the givenSoundEvent.definition- ASoundDefinitionthat defines the given sound.
-
add
Adds the entry name associated with the givenSoundEventwith theSoundDefinitionto the list.This method should be preferred when a
SoundEventis already available in the method context. If you already have aSupplierfor it, refer toadd(Supplier, SoundDefinition).- Parameters:
soundEvent- ASoundEvent.definition- TheSoundDefinitionthat defines the given event.
-
add
- Parameters:
soundEvent- TheIdentifierthat identifies the event.definition- TheSoundDefinitionthat defines the given event.
-
add
Adds theSoundEventwith the specified name along with itsSoundDefinitionto the list.The given sound event must NOT contain the namespace the name is a part of, since the sound definition specification doesn't allow sounds to be defined outside the namespace they're in. For this reason, any namespace will automatically be stripped from the name.
- Parameters:
soundEvent- The name of theSoundEvent.definition- TheSoundDefinitionthat defines the given event.
-