Package net.minecraft.util
Class TimeHelper
java.lang.Object
net.minecraft.util.TimeHelper
A class holding utility methods related to time and durations.
- Mappings:
Namespace Name official avp
intermediary net/minecraft/class_4802
named net/minecraft/util/TimeHelper
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
The equivalent of 1 hour, in seconds.static final long
The equivalent of 1 millisecond, in nanoseconds.static final long
The equivalent of 1 second, in milliseconds.static final long
The equivalent of 1 second, in nanoseconds. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UniformIntProvider
betweenSeconds
(int min, int max) Returns an int provider that provides a time in ticks, betweenmin * 20
andmax * 20
(both inclusive).
-
Field Details
-
SECOND_IN_NANOS
public static final long SECOND_IN_NANOSThe equivalent of 1 second, in nanoseconds. Is1000000000
.- Mappings:
Namespace Name Mixin selector official a
Lavp;a:J
intermediary field_33868
Lnet/minecraft/class_4802;field_33868:J
named SECOND_IN_NANOS
Lnet/minecraft/util/TimeHelper;SECOND_IN_NANOS:J
-
MILLI_IN_NANOS
public static final long MILLI_IN_NANOSThe equivalent of 1 millisecond, in nanoseconds. Is1000000
.- Mappings:
Namespace Name Mixin selector official b
Lavp;b:J
intermediary field_33869
Lnet/minecraft/class_4802;field_33869:J
named MILLI_IN_NANOS
Lnet/minecraft/util/TimeHelper;MILLI_IN_NANOS:J
-
SECOND_IN_MILLIS
public static final long SECOND_IN_MILLISThe equivalent of 1 second, in milliseconds. Is1000
.- Mappings:
Namespace Name Mixin selector official c
Lavp;c:J
intermediary field_46957
Lnet/minecraft/class_4802;field_46957:J
named SECOND_IN_MILLIS
Lnet/minecraft/util/TimeHelper;SECOND_IN_MILLIS:J
-
HOUR_IN_SECONDS
public static final long HOUR_IN_SECONDSThe equivalent of 1 hour, in seconds. Is3600
.- Mappings:
Namespace Name Mixin selector official d
Lavp;d:J
intermediary field_46958
Lnet/minecraft/class_4802;field_46958:J
named HOUR_IN_SECONDS
Lnet/minecraft/util/TimeHelper;HOUR_IN_SECONDS:J
-
-
Constructor Details
-
TimeHelper
public TimeHelper()
-
-
Method Details
-
betweenSeconds
Returns an int provider that provides a time in ticks, betweenmin * 20
andmax * 20
(both inclusive).- Returns:
- an int provider that provides a time in ticks, between
min * 20
andmax * 20
(both inclusive) - Mappings:
Namespace Name Mixin selector official a
Lavp;a(II)Lbjm;
intermediary method_24505
Lnet/minecraft/class_4802;method_24505(II)Lnet/minecraft/class_6019;
named betweenSeconds
Lnet/minecraft/util/TimeHelper;betweenSeconds(II)Lnet/minecraft/util/math/intprovider/UniformIntProvider;
-