Package net.minecraft.sound
Record Class SoundEvent
java.lang.Object
java.lang.Record
net.minecraft.sound.SoundEvent
- Record Components:
id-getStaticDistanceToTravel-
- Mappings:
Namespace Name named net/minecraft/sound/SoundEventintermediary net/minecraft/class_3414official axenamed idintermediary comp_3319official enamed getStaticDistanceToTravelintermediary comp_3320official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SoundEvent> static final com.mojang.serialization.Codec<RegistryEntry<SoundEvent>> static final PacketCodec<RegistryByteBuf, RegistryEntry<SoundEvent>> The field for thegetStaticDistanceToTravelrecord component.private final IdentifierThe field for theidrecord component.static final PacketCodec<ByteBuf, SoundEvent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatgetDistanceToTravel(float volume) Returns the value of thegetStaticDistanceToTravelrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.static SoundEventof(Identifier id) static SoundEventof(Identifier id, float distanceToTravel) private static SoundEventof(Identifier id, Optional<Float> distanceToTravel) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
getStaticDistanceToTravel
The field for thegetStaticDistanceToTravelrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/sound/SoundEvent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_41698Lnet/minecraft/class_3414;field_41698:Lcom/mojang/serialization/Codec;official aLaxe;a:Lcom/mojang/serialization/Codec;
-
ENTRY_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_CODECLnet/minecraft/sound/SoundEvent;ENTRY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_41699Lnet/minecraft/class_3414;field_41699:Lcom/mojang/serialization/Codec;official bLaxe;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/sound/SoundEvent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48278Lnet/minecraft/class_3414;field_48278:Lnet/minecraft/class_9139;official cLaxe;c:Lzt;
-
ENTRY_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_PACKET_CODECLnet/minecraft/sound/SoundEvent;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48279Lnet/minecraft/class_3414;field_48279:Lnet/minecraft/class_9139;official dLaxe;d:Lzt;
-
-
Constructor Details
-
SoundEvent
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/sound/SoundEvent;<init>(Lnet/minecraft/util/Identifier;Ljava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_3414;<init>(Lnet/minecraft/class_2960;Ljava/util/Optional;)Vofficial <init>Laxe;<init>(Lalz;Ljava/util/Optional;)V
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;Ljava/util/Optional;)Lnet/minecraft/sound/SoundEvent;intermediary method_47956Lnet/minecraft/class_3414;method_47956(Lnet/minecraft/class_2960;Ljava/util/Optional;)Lnet/minecraft/class_3414;official aLaxe;a(Lalz;Ljava/util/Optional;)Laxe;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;)Lnet/minecraft/sound/SoundEvent;intermediary method_47908Lnet/minecraft/class_3414;method_47908(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3414;official aLaxe;a(Lalz;)Laxe;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;F)Lnet/minecraft/sound/SoundEvent;intermediary method_47909Lnet/minecraft/class_3414;method_47909(Lnet/minecraft/class_2960;F)Lnet/minecraft/class_3414;official aLaxe;a(Lalz;F)Laxe;
-
getDistanceToTravel
public float getDistanceToTravel(float volume) - Mappings:
Namespace Name Mixin selector named getDistanceToTravelLnet/minecraft/sound/SoundEvent;getDistanceToTravel(F)Fintermediary method_43044Lnet/minecraft/class_3414;method_43044(F)Fofficial aLaxe;a(F)F
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
getStaticDistanceToTravel
Returns the value of thegetStaticDistanceToTravelrecord component.- Returns:
- the value of the
getStaticDistanceToTravelrecord component
-