Record Class ItemCooldowns.CooldownInstance
java.lang.Object
java.lang.Record
net.minecraft.world.item.ItemCooldowns.CooldownInstance
- Enclosing class:
ItemCooldowns
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCooldownInstance(int startTime, int endTime) Creates an instance of aCooldownInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintendTime()Returns the value of theendTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thestartTimerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
startTime
private final int startTimeThe field for thestartTimerecord component. -
endTime
private final int endTimeThe field for theendTimerecord component.
-
-
Constructor Details
-
CooldownInstance
private CooldownInstance(int startTime, int endTime) Creates an instance of aCooldownInstancerecord class.- Parameters:
startTime- the value for thestartTimerecord componentendTime- the value for theendTimerecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
startTime
public int startTime()Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
endTime
public int endTime()Returns the value of theendTimerecord component.- Returns:
- the value of the
endTimerecord component
-