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/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 Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<JukeboxSong> private final int
The field for thecomparatorOutput
record component.private final Text
The field for thedescription
record component.static final com.mojang.serialization.Codec
<RegistryEntry<JukeboxSong>> static final PacketCodec
<RegistryByteBuf, RegistryEntry<JukeboxSong>> private final float
The field for thelengthInSeconds
record component.static final PacketCodec
<RegistryByteBuf, JukeboxSong> private final RegistryEntry
<SoundEvent> The field for thesoundEvent
record component.private static final int
-
Constructor Summary
ConstructorDescriptionJukeboxSong
(RegistryEntry<SoundEvent> registryEntry, Text text, float float2, int int2) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecomparatorOutput
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.int
static Optional
<RegistryEntry<JukeboxSong>> getSongEntryFromStack
(RegistryWrapper.WrapperLookup registries, ItemStack stack) final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thelengthInSeconds
record component.boolean
shouldStopPlaying
(long ticksSinceSongStarted) Returns the value of thesoundEvent
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
soundEvent
The field for thesoundEvent
record component. -
description
The field for thedescription
record component. -
lengthInSeconds
private final float lengthInSecondsThe field for thelengthInSeconds
record component. -
comparatorOutput
private final int comparatorOutputThe field for thecomparatorOutput
record component. -
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
- 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
- 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
- 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
-
JukeboxSong
-
-
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
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 thesoundEvent
record component.- Returns:
- the value of the
soundEvent
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
lengthInSeconds
public float lengthInSeconds()Returns the value of thelengthInSeconds
record component.- Returns:
- the value of the
lengthInSeconds
record component
-
comparatorOutput
public int comparatorOutput()Returns the value of thecomparatorOutput
record component.- Returns:
- the value of the
comparatorOutput
record component
-