Record Class EntitySoundEffectPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.EntitySoundEffectPacket
- All Implemented Interfaces:
NetworkBuffer.Writer,SendablePacket,ServerPacket,ServerPacket.Play
public record EntitySoundEffectPacket(@Nullable SoundEvent soundEvent, @Nullable String soundName, @Nullable Float range, Sound.Source source, int entityId, float volume, float pitch, long seed)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Constructor Summary
ConstructorsConstructorDescriptionEntitySoundEffectPacket(@NotNull String soundName, @Nullable Float range, Sound.Source source, int entityId, float volume, float pitch, long seed) EntitySoundEffectPacket(@NotNull NetworkBuffer reader) EntitySoundEffectPacket(@NotNull SoundEvent soundEvent, @Nullable Float range, Sound.Source source, int entityId, float volume, float pitch, long seed) EntitySoundEffectPacket(@Nullable SoundEvent soundEvent, @Nullable String soundName, @Nullable Float range, Sound.Source source, int entityId, float volume, float pitch, long seed) Creates an instance of aEntitySoundEffectPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.intplayId()@Nullable Floatrange()Returns the value of therangerecord component.longseed()Returns the value of theseedrecord component.@Nullable SoundEventReturns the value of thesoundEventrecord component.@Nullable StringReturns the value of thesoundNamerecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.voidwrite(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.network.packet.server.ServerPacket
getId
-
Constructor Details
-
EntitySoundEffectPacket
public EntitySoundEffectPacket(@Nullable @Nullable SoundEvent soundEvent, @Nullable @Nullable String soundName, @Nullable @Nullable Float range, @NotNull Sound.Source source, int entityId, float volume, float pitch, long seed) Creates an instance of aEntitySoundEffectPacketrecord class.- Parameters:
soundEvent- the value for thesoundEventrecord componentsoundName- the value for thesoundNamerecord componentrange- the value for therangerecord componentsource- the value for thesourcerecord componententityId- the value for theentityIdrecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentseed- the value for theseedrecord component
-
EntitySoundEffectPacket
public EntitySoundEffectPacket(@NotNull @NotNull SoundEvent soundEvent, @Nullable @Nullable Float range, @NotNull Sound.Source source, int entityId, float volume, float pitch, long seed) -
EntitySoundEffectPacket
public EntitySoundEffectPacket(@NotNull @NotNull String soundName, @Nullable @Nullable Float range, @NotNull Sound.Source source, int entityId, float volume, float pitch, long seed) -
EntitySoundEffectPacket
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
playId
public int playId()- Specified by:
playIdin interfaceServerPacket.Play
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
soundEvent
Returns the value of thesoundEventrecord component.- Returns:
- the value of the
soundEventrecord component
-
soundName
Returns the value of thesoundNamerecord component.- Returns:
- the value of the
soundNamerecord component
-
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
volume
public float volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
seed
public long seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-