Record Class SulfurCubeArchetype.SoundSettings
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SulfurCubeArchetype.SoundSettings
- Enclosing class:
SulfurCubeArchetype
public static record SulfurCubeArchetype.SoundSettings(Holder<SoundEvent> hitSound, Holder<SoundEvent> pushSound, float pushSoundImpulseThreshold, float pushSoundCooldown)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SulfurCubeArchetype.SoundSettings> private final Holder<SoundEvent> The field for thehitSoundrecord component.private final Holder<SoundEvent> The field for thepushSoundrecord component.private final floatThe field for thepushSoundCooldownrecord component.private final floatThe field for thepushSoundImpulseThresholdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSoundSettings(Holder<SoundEvent> hitSound, Holder<SoundEvent> pushSound, float pushSoundImpulseThreshold, float pushSoundCooldown) Creates an instance of aSoundSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hitSound()Returns the value of thehitSoundrecord component.Returns the value of thepushSoundrecord component.floatReturns the value of thepushSoundCooldownrecord component.floatReturns the value of thepushSoundImpulseThresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
hitSound
The field for thehitSoundrecord component. -
pushSound
The field for thepushSoundrecord component. -
pushSoundImpulseThreshold
private final float pushSoundImpulseThresholdThe field for thepushSoundImpulseThresholdrecord component. -
pushSoundCooldown
private final float pushSoundCooldownThe field for thepushSoundCooldownrecord component. -
CODEC
-
-
Constructor Details
-
SoundSettings
public SoundSettings(Holder<SoundEvent> hitSound, Holder<SoundEvent> pushSound, float pushSoundImpulseThreshold, float pushSoundCooldown) Creates an instance of aSoundSettingsrecord class.- Parameters:
hitSound- the value for thehitSoundrecord componentpushSound- the value for thepushSoundrecord componentpushSoundImpulseThreshold- the value for thepushSoundImpulseThresholdrecord componentpushSoundCooldown- the value for thepushSoundCooldownrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
hitSound
Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-
pushSound
Returns the value of thepushSoundrecord component.- Returns:
- the value of the
pushSoundrecord component
-
pushSoundImpulseThreshold
public float pushSoundImpulseThreshold()Returns the value of thepushSoundImpulseThresholdrecord component.- Returns:
- the value of the
pushSoundImpulseThresholdrecord component
-
pushSoundCooldown
public float pushSoundCooldown()Returns the value of thepushSoundCooldownrecord component.- Returns:
- the value of the
pushSoundCooldownrecord component
-