Record Class GeyserInstrument.Wrapper
java.lang.Object
java.lang.Record
org.geysermc.geyser.inventory.item.GeyserInstrument.Wrapper
- All Implemented Interfaces:
GeyserInstrument
- Enclosing interface:
- GeyserInstrument
public static record GeyserInstrument.Wrapper(org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentComponent.Instrument instrument, String locale)
extends Record
implements GeyserInstrument
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.inventory.item.GeyserInstrument
GeyserInstrument.BedrockInstrument, GeyserInstrument.Impl, GeyserInstrument.Wrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIn Bedrock formatfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentComponent.InstrumentReturns the value of theinstrumentrecord component.locale()Returns the value of thelocalerecord component.floatrange()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.inventory.item.GeyserInstrument
bedrockId
-
Constructor Details
-
Wrapper
public Wrapper(org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentComponent.Instrument instrument, String locale) Creates an instance of aWrapperrecord class.- Parameters:
instrument- the value for theinstrumentrecord componentlocale- the value for thelocalerecord component
-
-
Method Details
-
soundEvent
- Specified by:
soundEventin interfaceGeyserInstrument
-
range
public float range()- Specified by:
rangein interfaceGeyserInstrument
-
description
Description copied from interface:GeyserInstrumentIn Bedrock format- Specified by:
descriptionin interfaceGeyserInstrument
-
bedrockInstrument
- Specified by:
bedrockInstrumentin interfaceGeyserInstrument
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
instrument
public org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentComponent.Instrument instrument()Returns the value of theinstrumentrecord component.- Returns:
- the value of the
instrumentrecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-