Package net.minecraft.block.jukebox
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/JukeboxSongintermediary net/minecraft/class_9793official cuvnamed soundEventintermediary comp_2835official enamed descriptionintermediary comp_2836official fnamed lengthInSecondsintermediary comp_2837official gnamed comparatorOutputintermediary comp_2838official h
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<JukeboxSong> private final intThe field for thecomparatorOutputrecord component.private final TextThe field for thedescriptionrecord component.static final com.mojang.serialization.Codec<RegistryEntry<JukeboxSong>> static final PacketCodec<RegistryByteBuf, RegistryEntry<JukeboxSong>> private final floatThe field for thelengthInSecondsrecord component.static final PacketCodec<RegistryByteBuf, JukeboxSong> private final RegistryEntry<SoundEvent> The field for thesoundEventrecord component.private static final int -
Constructor Summary
ConstructorsConstructorDescriptionJukeboxSong(RegistryEntry<SoundEvent> registryEntry, Text text, float float2, int int2) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecomparatorOutputrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.intstatic Optional<RegistryEntry<JukeboxSong>> getSongEntryFromStack(RegistryWrapper.WrapperLookup registryLookup, ItemStack stack) final inthashCode()Returns a hash code value for this object.floatReturns the value of thelengthInSecondsrecord component.booleanshouldStopPlaying(long ticksSinceSongStarted) Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
soundEvent
The field for thesoundEventrecord component. -
description
The field for thedescriptionrecord component. -
lengthInSeconds
private final float lengthInSecondsThe field for thelengthInSecondsrecord component. -
comparatorOutput
private final int comparatorOutputThe field for thecomparatorOutputrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/jukebox/JukeboxSong;CODEC:Lcom/mojang/serialization/Codec;intermediary field_52027Lnet/minecraft/class_9793;field_52027:Lcom/mojang/serialization/Codec;official aLcuv;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/block/jukebox/JukeboxSong;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_52028Lnet/minecraft/class_9793;field_52028:Lnet/minecraft/class_9139;official bLcuv;b:Lyx;
-
ENTRY_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_CODECLnet/minecraft/block/jukebox/JukeboxSong;ENTRY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_52029Lnet/minecraft/class_9793;field_52029:Lcom/mojang/serialization/Codec;official cLcuv;c:Lcom/mojang/serialization/Codec;
-
ENTRY_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_PACKET_CODECLnet/minecraft/block/jukebox/JukeboxSong;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_52030Lnet/minecraft/class_9793;field_52030:Lnet/minecraft/class_9139;official dLcuv;d:Lyx;
-
TICKS_PER_SECOND
private static final int TICKS_PER_SECOND- See Also:
- Mappings:
Namespace Name Mixin selector named TICKS_PER_SECONDLnet/minecraft/block/jukebox/JukeboxSong;TICKS_PER_SECOND:Iintermediary field_52031Lnet/minecraft/class_9793;field_52031:Iofficial iLcuv;i:I
-
-
Constructor Details
-
JukeboxSong
-
-
Method Details
-
getLengthInTicks
public int getLengthInTicks()- Mappings:
Namespace Name Mixin selector named getLengthInTicksLnet/minecraft/block/jukebox/JukeboxSong;getLengthInTicks()Iintermediary method_60750Lnet/minecraft/class_9793;method_60750()Iofficial aLcuv;a()I
-
shouldStopPlaying
public boolean shouldStopPlaying(long ticksSinceSongStarted) - Mappings:
Namespace Name Mixin selector named shouldStopPlayingLnet/minecraft/block/jukebox/JukeboxSong;shouldStopPlaying(J)Zintermediary method_60751Lnet/minecraft/class_9793;method_60751(J)Zofficial aLcuv;a(J)Z
-
getSongEntryFromStack
public static Optional<RegistryEntry<JukeboxSong>> getSongEntryFromStack(RegistryWrapper.WrapperLookup registryLookup, ItemStack stack) - Mappings:
Namespace Name Mixin selector named getSongEntryFromStackLnet/minecraft/block/jukebox/JukeboxSong;getSongEntryFromStack(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;intermediary method_60753Lnet/minecraft/class_9793;method_60753(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_1799;)Ljava/util/Optional;official aLcuv;a(Ljo$a;Lcuq;)Ljava/util/Optional;
-
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
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
lengthInSeconds
public float lengthInSeconds()Returns the value of thelengthInSecondsrecord component.- Returns:
- the value of the
lengthInSecondsrecord component
-
comparatorOutput
public int comparatorOutput()Returns the value of thecomparatorOutputrecord component.- Returns:
- the value of the
comparatorOutputrecord component
-