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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<VibrationFrequency> private final int
The field for thefrequency
record component.static final com.mojang.serialization.Codec
<VibrationFrequency> -
Constructor Summary
ConstructorDescriptionVibrationFrequency
(int frequency) Creates an instance of aVibrationFrequency
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thefrequency
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
frequency
private final int frequencyThe field for thefrequency
record component. -
FREQUENCY_CODEC
-
CODEC
-
-
Constructor Details
-
VibrationFrequency
public VibrationFrequency(int frequency) Creates an instance of aVibrationFrequency
record class.- Parameters:
frequency
- the value for thefrequency
record 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 thefrequency
record component.- Returns:
- the value of the
frequency
record component
-