Record Class JukeboxSong

java.lang.Object
java.lang.Record
net.minecraft.block.jukebox.JukeboxSong
Record Components:
soundEvent -
description -
lengthInSeconds -
comparatorOutput -

public record JukeboxSong(RegistryEntry<SoundEvent> soundEvent, Text description, float lengthInSeconds, int comparatorOutput) extends Record
Mappings:
Namespace Name
named net/minecraft/block/jukebox/JukeboxSong
intermediary net/minecraft/class_9793
official cxu
named soundEvent
intermediary comp_2835
official e
named description
intermediary comp_2836
official f
named lengthInSeconds
intermediary comp_2837
official g
named comparatorOutput
intermediary comp_2838
official h
  • Field Details

    • soundEvent

      private final RegistryEntry<SoundEvent> soundEvent
      The field for the soundEvent record component.
    • description

      private final Text description
      The field for the description record component.
    • lengthInSeconds

      private final float lengthInSeconds
      The field for the lengthInSeconds record component.
    • comparatorOutput

      private final int comparatorOutput
      The field for the comparatorOutput record component.
    • CODEC

      public static final com.mojang.serialization.Codec<JukeboxSong> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/block/jukebox/JukeboxSong;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_52027 Lnet/minecraft/class_9793;field_52027:Lcom/mojang/serialization/Codec;
      official a Lcxu;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,JukeboxSong> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/block/jukebox/JukeboxSong;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_52028 Lnet/minecraft/class_9793;field_52028:Lnet/minecraft/class_9139;
      official b Lcxu;b:Lzt;
    • ENTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<JukeboxSong>> ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_CODEC Lnet/minecraft/block/jukebox/JukeboxSong;ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_52029 Lnet/minecraft/class_9793;field_52029:Lcom/mojang/serialization/Codec;
      official c Lcxu;c:Lcom/mojang/serialization/Codec;
    • ENTRY_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<JukeboxSong>> ENTRY_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_PACKET_CODEC Lnet/minecraft/block/jukebox/JukeboxSong;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_52030 Lnet/minecraft/class_9793;field_52030:Lnet/minecraft/class_9139;
      official d Lcxu;d:Lzt;
    • TICKS_PER_SECOND

      private static final int TICKS_PER_SECOND
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named TICKS_PER_SECOND Lnet/minecraft/block/jukebox/JukeboxSong;TICKS_PER_SECOND:I
      intermediary field_52031 Lnet/minecraft/class_9793;field_52031:I
      official i Lcxu;i:I
  • Constructor Details

  • Method Details

    • getLengthInTicks

      public int getLengthInTicks()
      Mappings:
      Namespace Name Mixin selector
      named getLengthInTicks Lnet/minecraft/block/jukebox/JukeboxSong;getLengthInTicks()I
      intermediary method_60750 Lnet/minecraft/class_9793;method_60750()I
      official a Lcxu;a()I
    • shouldStopPlaying

      public boolean shouldStopPlaying(long ticksSinceSongStarted)
      Mappings:
      Namespace Name Mixin selector
      named shouldStopPlaying Lnet/minecraft/block/jukebox/JukeboxSong;shouldStopPlaying(J)Z
      intermediary method_60751 Lnet/minecraft/class_9793;method_60751(J)Z
      official a Lcxu;a(J)Z
    • getSongEntryFromStack

      public static Optional<RegistryEntry<JukeboxSong>> getSongEntryFromStack(RegistryWrapper.WrapperLookup registries, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named getSongEntryFromStack Lnet/minecraft/block/jukebox/JukeboxSong;getSongEntryFromStack(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
      intermediary method_60753 Lnet/minecraft/class_9793;method_60753(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_1799;)Ljava/util/Optional;
      official a Lcxu;a(Ljs$a;Lcxo;)Ljava/util/Optional;
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • soundEvent

      public RegistryEntry<SoundEvent> soundEvent()
      Returns the value of the soundEvent record component.
      Returns:
      the value of the soundEvent record component
    • description

      public Text description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • lengthInSeconds

      public float lengthInSeconds()
      Returns the value of the lengthInSeconds record component.
      Returns:
      the value of the lengthInSeconds record component
    • comparatorOutput

      public int comparatorOutput()
      Returns the value of the comparatorOutput record component.
      Returns:
      the value of the comparatorOutput record component