Package dev.jaxydog.astral.content.sound
Class AstralSoundEvent
java.lang.Object
net.minecraft.sound.SoundEvent
dev.jaxydog.astral.content.sound.AstralSoundEvent
- All Implemented Interfaces:
Registered,Registered.Common
An extension of a
SoundEvent that provides commonly used functionality.
This type is automatically registered.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Field Summary
Fields inherited from class net.minecraft.sound.SoundEvent
CODEC, ENTRY_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAstralSoundEvent(String path) Creates a new sound event.AstralSoundEvent(String path, float distanceTraveled) Creates a new sound event. -
Method Summary
Modifier and TypeMethodDescriptionReturns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class net.minecraft.sound.SoundEvent
fromBuf, getDistanceToTravel, getId, of, of, writeBufMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryId
-
Constructor Details
-
AstralSoundEvent
Creates a new sound event.- Parameters:
path- The sound event's identifier path.distanceTraveled- The distance that the sound travels in blocks.- Since:
- 2.0.0
-
AstralSoundEvent
Creates a new sound event.- Parameters:
path- The sound event's identifier path.- Since:
- 2.0.0
-
-
Method Details
-
getRegistryPath
Description copied from interface:RegisteredReturns this value's associated registry identifier path.This is by default used to determine the
Identifierprovided byRegistered.getRegistryId(). For example, returning"my_item"will cause the associated identifier to beastral:my_item.- Specified by:
getRegistryPathin interfaceRegistered- Returns:
- An identifier path.
-
registerCommon
public void registerCommon()Description copied from interface:Registered.CommonRegisters this value on both the client and server environments.The contained code will run for both environments. If you only want one or the other, see its sister interfaces.
- Specified by:
registerCommonin interfaceRegistered.Common- See Also:
-