Package net.minecraft.util
Class Util
java.lang.Object
net.minecraft.util.Util
public class Util extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classUtil.IdentityHashStrategystatic classUtil.OperatingSystem -
Field Summary
Fields Modifier and Type Field Description private static ExecutorServiceBOOTSTRAPprivate static ExecutorServicefield_24477private static LoggerLOGGERstatic LongSuppliernanoTimeSupplierprivate static AtomicIntegerNEXT_SERVER_WORKER_IDstatic UUIDNIL_UUIDprivate static ExecutorServiceSERVER_WORKER_EXECUTOR -
Constructor Summary
Constructors Constructor Description Util() -
Method Summary
Modifier and Type Method Description static <V> CompletableFuture<List<V>>combine(List<? extends CompletableFuture<? extends V>> futures)static <T> CompletableFuture<T>completeExceptionally(Throwable throwable)static StringcreateTranslationKey(String type, Identifier id)static RunnabledebugRunnable(Runnable runnable, Supplier<String> messageSupplier)static longgetEpochTimeMs()static StringgetInnermostMessage(Throwable t)static Stream<String>getJVMFlags()static <T> TgetLast(List<T> list)static longgetMeasuringTimeMs()static longgetMeasuringTimeNano()static Util.OperatingSystemgetOperatingSystem()static intgetRandom(int[] array, Random random)static <T> TgetRandom(T[] array, Random random)static ExecutorgetServerWorkerExecutor()static <T extends Comparable<T>>
StringgetValueAsString(Property<T> property, Object object)static <K> Hash.Strategy<K>identityHashStrategy()static <T> Optional<T>ifPresentOrElse(Optional<T> optional, Consumer<T> consumer, Runnable runnable)static <T> Tmake(Supplier<T> factory)static <T> Tmake(T object, Consumer<T> initializer)private static voidmethod_18347(Thread thread, Throwable throwable)static voidmethod_27760(File file, File file2, File file3)private static voidmethod_27957(ExecutorService executorService)static Executormethod_27958()private static ExecutorServicemethod_27959()private static ExecutorServicemethod_28122(String string)static Executormethod_28124()static com.mojang.datafixers.types.Type<?>method_29187(com.mojang.datafixers.DSL.TypeReference typeReference, String string)static Consumer<String>method_29188(String string, Consumer<String> consumer)private static com.mojang.datafixers.types.Type<?>method_29191(com.mojang.datafixers.DSL.TypeReference typeReference, String string)static voidmethod_29476()static voidmethod_29775(Path path, Path path2, Path path3)static intmoveCursor(String string, int cursor, int delta)Moves thecursorin thestringby adeltaamount.static <T> Tnext(Iterable<T> iterable, T t)static <T> Tprevious(Iterable<T> iterable, T t)static voidshutdownServerWorkerExecutor()static <T> Stream<T>stream(Optional<? extends T> optional)static <T extends Throwable>
TthrowOrPause(T t)static voidthrowUnchecked(Throwable throwable)static com.mojang.serialization.DataResult<int[]>toIntArray(IntStream intStream, int length)static <K, V> Collector<Map.Entry<? extends K,? extends V>,?,Map<K,V>>toMap()
-
Field Details
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
toMap
-
getValueAsString
public static <T extends Comparable<T>> String getValueAsString(Property<T> property, Object object) -
createTranslationKey
-
getMeasuringTimeMs
public static long getMeasuringTimeMs() -
getMeasuringTimeNano
public static long getMeasuringTimeNano() -
getEpochTimeMs
public static long getEpochTimeMs() -
method_28122
-
method_28124
-
getServerWorkerExecutor
-
method_27958
-
shutdownServerWorkerExecutor
public static void shutdownServerWorkerExecutor() -
method_27957
-
method_27959
-
completeExceptionally
@Environment(CLIENT) public static <T> CompletableFuture<T> completeExceptionally(Throwable throwable) -
throwUnchecked
-
method_18347
-
method_29187
-
method_29191
-
getOperatingSystem
-
getJVMFlags
-
getLast
-
next
-
previous
-
make
-
make
-
identityHashStrategy
-
combine
public static <V> CompletableFuture<List<V>> combine(List<? extends CompletableFuture<? extends V>> futures) -
stream
-
ifPresentOrElse
-
debugRunnable
-
throwOrPause
-
getInnermostMessage
-
getRandom
-
getRandom
-
method_27760
-
moveCursor
Moves thecursorin thestringby adeltaamount. Skips surrogate characters. -
method_29188
-
toIntArray
public static com.mojang.serialization.DataResult<int[]> toIntArray(IntStream intStream, int length) -
method_29476
public static void method_29476() -
method_29775
@Environment(CLIENT) public static void method_29775(Path path, Path path2, Path path3) throws IOException- Throws:
IOException
-