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 apwintermediary net/minecraft/class_4802named net/minecraft/util/TimeHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe equivalent of 1 millisecond, in nanoseconds.static final longThe equivalent of 1 second, in nanoseconds. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UniformIntProviderbetweenSeconds(int min, int max) Returns an int provider that provides a time in ticks, betweenmin * 20andmax * 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 aLapw;a:Jintermediary field_33868Lnet/minecraft/class_4802;field_33868:Jnamed SECOND_IN_NANOSLnet/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 bLapw;b:Jintermediary field_33869Lnet/minecraft/class_4802;field_33869:Jnamed MILLI_IN_NANOSLnet/minecraft/util/TimeHelper;MILLI_IN_NANOS:J
-
-
Constructor Details
-
TimeHelper
public TimeHelper()
-
-
Method Details
-
betweenSeconds
Returns an int provider that provides a time in ticks, betweenmin * 20andmax * 20(both inclusive).- Returns:
- an int provider that provides a time in ticks, between
min * 20andmax * 20(both inclusive) - Mappings:
Namespace Name Mixin selector official aLapw;a(II)Lbdh;intermediary method_24505Lnet/minecraft/class_4802;method_24505(II)Lnet/minecraft/class_6019;named betweenSecondsLnet/minecraft/util/TimeHelper;betweenSeconds(II)Lnet/minecraft/util/math/intprovider/UniformIntProvider;
-