Package net.minecraft.item
Record Class Instrument
java.lang.Object
java.lang.Record
net.minecraft.item.Instrument
- Record Components:
soundEvent-useDuration-range-
public record Instrument(RegistryEntry<SoundEvent> soundEvent, int useDuration, float range)
extends Record
- Mappings:
Namespace Name named net/minecraft/item/Instrumentintermediary net/minecraft/class_7444official cuinamed soundEventintermediary comp_772official enamed useDurationintermediary comp_773official fnamed rangeintermediary comp_774official g
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Instrument> static final com.mojang.serialization.Codec<RegistryEntry<Instrument>> static final PacketCodec<RegistryByteBuf, RegistryEntry<Instrument>> static final PacketCodec<RegistryByteBuf, Instrument> private final floatThe field for therangerecord component.private final RegistryEntry<SoundEvent> The field for thesoundEventrecord component.private final intThe field for theuseDurationrecord component. -
Constructor Summary
Constructors -
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.floatrange()Returns the value of therangerecord component.Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theuseDurationrecord component.
-
Field Details
-
soundEvent
The field for thesoundEventrecord component. -
useDuration
private final int useDurationThe field for theuseDurationrecord component. -
range
private final float rangeThe field for therangerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/item/Instrument;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49260Lnet/minecraft/class_7444;field_49260:Lcom/mojang/serialization/Codec;official aLcui;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/item/Instrument;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49261Lnet/minecraft/class_7444;field_49261:Lnet/minecraft/class_9139;official bLcui;b:Lyx;
-
ENTRY_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_CODECLnet/minecraft/item/Instrument;ENTRY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_39122Lnet/minecraft/class_7444;field_39122:Lcom/mojang/serialization/Codec;official cLcui;c:Lcom/mojang/serialization/Codec;
-
ENTRY_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_PACKET_CODECLnet/minecraft/item/Instrument;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49262Lnet/minecraft/class_7444;field_49262:Lnet/minecraft/class_9139;official dLcui;d:Lyx;
-
-
Constructor Details
-
Instrument
-
-
Method Details
-
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
-
useDuration
public int useDuration()Returns the value of theuseDurationrecord component.- Returns:
- the value of the
useDurationrecord component
-
range
public float range()Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-