Record Class ClientboundSpeakSoundPacket
java.lang.Object
java.lang.Record
com.codinglitch.simpleradio.core.networking.packets.ClientboundSpeakSoundPacket
- All Implemented Interfaces:
CustomPacket,net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ClientboundSpeakSoundPacket(UUID routerID, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> sound, float volume, float pitch, float severity, float offset, long seed)
extends Record
implements CustomPacket
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientboundSpeakSoundPacket(UUID routerID, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> sound, float volume, float pitch, float severity, float offset, long seed) Creates an instance of aClientboundSpeakSoundPacketrecord 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.net.minecraft.resources.ResourceLocationid()floatoffset()Returns the value of theoffsetrecord component.floatpitch()Returns the value of thepitchrecord component.static ClientboundSpeakSoundPacketread(net.minecraft.network.FriendlyByteBuf buffer) routerID()Returns the value of therouterIDrecord component.longseed()Returns the value of theseedrecord component.floatseverity()Returns the value of theseverityrecord component.net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.voidwrite(net.minecraft.network.FriendlyByteBuf buffer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.codinglitch.simpleradio.core.networking.CustomPacket
writeNew
-
Field Details
-
ID
public static net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
ClientboundSpeakSoundPacket
public ClientboundSpeakSoundPacket(UUID routerID, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> sound, float volume, float pitch, float severity, float offset, long seed) Creates an instance of aClientboundSpeakSoundPacketrecord class.- Parameters:
routerID- the value for therouterIDrecord componentsound- the value for thesoundrecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentseverity- the value for theseverityrecord componentoffset- the value for theoffsetrecord componentseed- the value for theseedrecord component
-
-
Method Details
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfaceCustomPacket- Specified by:
idin interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) - Specified by:
writein interfaceCustomPacket- Specified by:
writein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
read
-
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 '=='. -
routerID
Returns the value of therouterIDrecord component.- Returns:
- the value of the
routerIDrecord component
-
sound
public net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> sound()Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord 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
-
severity
public float severity()Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
offset
public float offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
seed
public long seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-