Record Class VibrationFrequency
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.VibrationFrequency
- Record Components:
frequency- the vibration frequency of the game event
Data map value for vibration frequencies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<VibrationFrequency> private final intThe field for thefrequencyrecord component.static final com.mojang.serialization.Codec<VibrationFrequency> -
Constructor Summary
ConstructorsConstructorDescriptionVibrationFrequency(int frequency) Creates an instance of aVibrationFrequencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefrequencyrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
frequency
private final int frequencyThe field for thefrequencyrecord component. -
FREQUENCY_CODEC
-
CODEC
-
-
Constructor Details
-
VibrationFrequency
public VibrationFrequency(int frequency) Creates an instance of aVibrationFrequencyrecord class.- Parameters:
frequency- the value for thefrequencyrecord component
-
-
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. All components in this record class are compared with '=='. -
frequency
public int frequency()Returns the value of thefrequencyrecord component.- Returns:
- the value of the
frequencyrecord component
-