Record Class SoundEventEventTranslator
java.lang.Object
java.lang.Record
org.geysermc.geyser.translator.level.event.SoundEventEventTranslator
- All Implemented Interfaces:
LevelEventTranslator
public record SoundEventEventTranslator(com.nukkitx.protocol.bedrock.data.SoundEvent soundEvent, String identifier, int extraData)
extends Record
implements LevelEventTranslator
-
Constructor Summary
ConstructorsConstructorDescriptionSoundEventEventTranslator(com.nukkitx.protocol.bedrock.data.SoundEvent soundEvent, String identifier, int extraData)Creates an instance of aSoundEventEventTranslatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.intReturns the value of theextraDatarecord component.inthashCode()Returns a hash code value for this object.Returns the value of theidentifierrecord component.com.nukkitx.protocol.bedrock.data.SoundEventReturns the value of thesoundEventrecord component.toString()Returns a string representation of this record class.voidtranslate(GeyserSession session, com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundLevelEventPacket packet)Translates the givenClientboundLevelEventPacketinto bedrock and sends it upstream.
-
Constructor Details
-
SoundEventEventTranslator
public SoundEventEventTranslator(com.nukkitx.protocol.bedrock.data.SoundEvent soundEvent, String identifier, int extraData)Creates an instance of aSoundEventEventTranslatorrecord class.- Parameters:
soundEvent- the value for thesoundEventrecord componentidentifier- the value for theidentifierrecord componentextraData- the value for theextraDatarecord component
-
-
Method Details
-
translate
public void translate(GeyserSession session, com.github.steveice10.mc.protocol.packet.ingame.clientbound.level.ClientboundLevelEventPacket packet)Description copied from interface:LevelEventTranslatorTranslates the givenClientboundLevelEventPacketinto bedrock and sends it upstream.- Specified by:
translatein interfaceLevelEventTranslator- Parameters:
session- GeyserConnectionpacket- the effect packet to handle
-
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
public com.nukkitx.protocol.bedrock.data.SoundEvent soundEvent()Returns the value of thesoundEventrecord component.- Returns:
- the value of the
soundEventrecord component
-
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
extraData
public int extraData()Returns the value of theextraDatarecord component.- Returns:
- the value of the
extraDatarecord component
-