Record Class Stopwatch
java.lang.Object
java.lang.Record
net.minecraft.world.timer.stopwatch.Stopwatch
- Record Components:
creationTime-accumulatedElapsedTime-
- Mappings:
Namespace Name named net/minecraft/world/timer/stopwatch/Stopwatchintermediary net/minecraft/class_12109official cdhnamed creationTimeintermediary comp_4950official anamed accumulatedElapsedTimeintermediary comp_4951official b
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theaccumulatedElapsedTimerecord component.private final longThe field for thecreationTimerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaccumulatedElapsedTimerecord component.longReturns the value of thecreationTimerecord component.final booleanIndicates whether some other object is "equal to" this one.longgetElapsedTimeMs(long timeMs) doublegetElapsedTimeSeconds(long timeMs) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
creationTime
private final long creationTimeThe field for thecreationTimerecord component. -
accumulatedElapsedTime
private final long accumulatedElapsedTimeThe field for theaccumulatedElapsedTimerecord component.
-
-
Constructor Details
-
Stopwatch
public Stopwatch(long creationTimeMs) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/timer/stopwatch/Stopwatch;<init>(J)Vintermediary <init>Lnet/minecraft/class_12109;<init>(J)Vofficial <init>Lcdh;<init>(J)V
-
Stopwatch
public Stopwatch(long creationTime, long accumulatedElapsedTime) Creates an instance of aStopwatchrecord class.- Parameters:
creationTime- the value for thecreationTimerecord componentaccumulatedElapsedTime- the value for theaccumulatedElapsedTimerecord component
-
-
Method Details
-
getElapsedTimeMs
public long getElapsedTimeMs(long timeMs) - Mappings:
Namespace Name Mixin selector named getElapsedTimeMsLnet/minecraft/world/timer/stopwatch/Stopwatch;getElapsedTimeMs(J)Jintermediary method_75104Lnet/minecraft/class_12109;method_75104(J)Jofficial aLcdh;a(J)J
-
getElapsedTimeSeconds
public double getElapsedTimeSeconds(long timeMs) - Mappings:
Namespace Name Mixin selector named getElapsedTimeSecondsLnet/minecraft/world/timer/stopwatch/Stopwatch;getElapsedTimeSeconds(J)Dintermediary method_75105Lnet/minecraft/class_12109;method_75105(J)Dofficial bLcdh;b(J)D
-
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 '=='. -
creationTime
public long creationTime()Returns the value of thecreationTimerecord component.- Returns:
- the value of the
creationTimerecord component
-
accumulatedElapsedTime
public long accumulatedElapsedTime()Returns the value of theaccumulatedElapsedTimerecord component.- Returns:
- the value of the
accumulatedElapsedTimerecord component
-