Record Class SoundEvent

java.lang.Object
java.lang.Record
net.minecraft.sound.SoundEvent
Record Components:
id -
fixedRange -

public record SoundEvent(Identifier id, Optional<Float> fixedRange) extends Record
Mappings:
Namespace Name
named net/minecraft/sound/SoundEvent
intermediary net/minecraft/class_3414
official axe
named id
intermediary comp_3319
official e
named fixedRange
intermediary comp_3320
official f
  • Field Details

    • id

      private final Identifier id
      The field for the id record component.
    • fixedRange

      private final Optional<Float> fixedRange
      The field for the fixedRange record component.
    • CODEC

      public static final com.mojang.serialization.Codec<SoundEvent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/sound/SoundEvent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_41698 Lnet/minecraft/class_3414;field_41698:Lcom/mojang/serialization/Codec;
      official a Laxe;a:Lcom/mojang/serialization/Codec;
    • ENTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<SoundEvent>> ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_CODEC Lnet/minecraft/sound/SoundEvent;ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_41699 Lnet/minecraft/class_3414;field_41699:Lcom/mojang/serialization/Codec;
      official b Laxe;b:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,SoundEvent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/sound/SoundEvent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48278 Lnet/minecraft/class_3414;field_48278:Lnet/minecraft/class_9139;
      official c Laxe;c:Lzt;
    • ENTRY_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<SoundEvent>> ENTRY_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_PACKET_CODEC Lnet/minecraft/sound/SoundEvent;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48279 Lnet/minecraft/class_3414;field_48279:Lnet/minecraft/class_9139;
      official d Laxe;d:Lzt;
  • Constructor Details

    • SoundEvent

      public SoundEvent(Identifier id, Optional<Float> optional)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/sound/SoundEvent;<init>(Lnet/minecraft/util/Identifier;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_3414;<init>(Lnet/minecraft/class_2960;Ljava/util/Optional;)V
      official <init> Laxe;<init>(Lalz;Ljava/util/Optional;)V
  • Method Details

    • of

      private static SoundEvent of(Identifier id, Optional<Float> fixedRange)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;Ljava/util/Optional;)Lnet/minecraft/sound/SoundEvent;
      intermediary method_47956 Lnet/minecraft/class_3414;method_47956(Lnet/minecraft/class_2960;Ljava/util/Optional;)Lnet/minecraft/class_3414;
      official a Laxe;a(Lalz;Ljava/util/Optional;)Laxe;
    • of

      public static SoundEvent of(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;)Lnet/minecraft/sound/SoundEvent;
      intermediary method_47908 Lnet/minecraft/class_3414;method_47908(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3414;
      official a Laxe;a(Lalz;)Laxe;
    • of

      public static SoundEvent of(Identifier id, float fixedRange)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/sound/SoundEvent;of(Lnet/minecraft/util/Identifier;F)Lnet/minecraft/sound/SoundEvent;
      intermediary method_47909 Lnet/minecraft/class_3414;method_47909(Lnet/minecraft/class_2960;F)Lnet/minecraft/class_3414;
      official a Laxe;a(Lalz;F)Laxe;
    • getDistanceToTravel

      public float getDistanceToTravel(float volume)
      Mappings:
      Namespace Name Mixin selector
      named getDistanceToTravel Lnet/minecraft/sound/SoundEvent;getDistanceToTravel(F)F
      intermediary method_43044 Lnet/minecraft/class_3414;method_43044(F)F
      official a Laxe;a(F)F
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • fixedRange

      public Optional<Float> fixedRange()
      Returns the value of the fixedRange record component.
      Returns:
      the value of the fixedRange record component