Package net.minecraft.sound
Record Class BiomeAdditionsSound
java.lang.Object
java.lang.Record
net.minecraft.sound.BiomeAdditionsSound
- Record Components:
sound-chance-
Represents an "additions sound" for a biome.
- Mappings:
Namespace Name named net/minecraft/sound/BiomeAdditionsSoundintermediary net/minecraft/class_4967official durnamed soundintermediary comp_4987official bnamed chanceintermediary comp_4988official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thechancerecord component.static final com.mojang.serialization.Codec<BiomeAdditionsSound> private final RegistryEntry<SoundEvent> The field for thesoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBiomeAdditionsSound(RegistryEntry<SoundEvent> sound, double chance) Creates an instance of aBiomeAdditionsSoundrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublechance()Returns the chance of this addition sound to play at any tick.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sound
The field for thesoundrecord component. -
chance
private final double chanceThe field for thechancerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/sound/BiomeAdditionsSound;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24673Lnet/minecraft/class_4967;field_24673:Lcom/mojang/serialization/Codec;official aLdur;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Method Details
-
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 '=='. -
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-
chance
public double chance()Returns the chance of this addition sound to play at any tick.- Mappings:
Namespace Name Mixin selector named chanceLnet/minecraft/sound/BiomeAdditionsSound;chance()Dintermediary comp_4988Lnet/minecraft/class_4967;comp_4988()Dofficial bLdur;b()D
-