Record Class SoundEffectPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.SoundEffectPacket
- All Implemented Interfaces:
SendablePacket, ServerPacket, ServerPacket.Play
public record SoundEffectPacket(SoundEvent soundEvent, Sound.Source source, Point origin, float volume, float pitch, long seed)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSoundEffectPacket(SoundEvent soundEvent, Sound.Source source, int x, int y, int z, float volume, float pitch, long seed) Deprecated, for removal: This API element is subject to removal in a future version.SoundEffectPacket(SoundEvent soundEvent, Sound.Source source, Point origin, float volume, float pitch, long seed) Creates an instance of aSoundEffectPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.origin()Returns the value of theoriginrecord component.floatpitch()Returns the value of thepitchrecord component.longseed()Returns the value of theseedrecord component.Returns the value of thesoundEventrecord 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.intx()Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockX()instead.inty()Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockY()instead.intz()Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockZ()instead.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
SoundEffectPacket
@Deprecated(forRemoval=true) public SoundEffectPacket(SoundEvent soundEvent, Sound.Source source, int x, int y, int z, float volume, float pitch, long seed) Deprecated, for removal: This API element is subject to removal in a future version. -
SoundEffectPacket
public SoundEffectPacket(SoundEvent soundEvent, Sound.Source source, Point origin, float volume, float pitch, long seed) Creates an instance of aSoundEffectPacketrecord class.- Parameters:
soundEvent- the value for thesoundEventrecord componentsource- the value for thesourcerecord componentorigin- the value for theoriginrecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentseed- the value for theseedrecord component
-
-
Method Details
-
x
Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockX()instead. -
y
Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockY()instead. -
z
Deprecated, for removal: This API element is subject to removal in a future version.Useorigin()withPoint.blockZ()instead. -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
soundEvent
Returns the value of thesoundEventrecord component.- Returns:
- the value of the
soundEventrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord 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
-
SoundEffectPacket(SoundEvent, Source, Point, float, float, long)