Package net.minecraft.item
Record Class Instrument
java.lang.Object
java.lang.Record
net.minecraft.item.Instrument
- Record Components:
soundEvent-useDuration-range-description-
public record Instrument(RegistryEntry<SoundEvent> soundEvent, float useDuration, float range, Text description)
extends Record
- Mappings:
Namespace Name named net/minecraft/item/Instrumentintermediary net/minecraft/class_7444official dadnamed soundEventintermediary comp_772official enamed useDurationintermediary comp_773official fnamed rangeintermediary comp_774official gnamed descriptionintermediary comp_2929official h
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Instrument> private final TextThe field for thedescriptionrecord component.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 floatThe field for theuseDurationrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInstrument(RegistryEntry<SoundEvent> registryEntry, float float2, float float3, Text text) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final 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.floatReturns the value of theuseDurationrecord component.
-
Field Details
-
soundEvent
The field for thesoundEventrecord component. -
useDuration
private final float useDurationThe field for theuseDurationrecord component. -
range
private final float rangeThe field for therangerecord component. -
description
The field for thedescriptionrecord 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 aLdad;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 bLdad;b:Lze;
-
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 cLdad;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 dLdad;d:Lze;
-
-
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 float 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
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-