public class Util extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Util.IdentityHashStrategy |
static class |
Util.OperatingSystem |
| Modifier and Type | Field and Description |
|---|---|
private static ExecutorService |
BOOTSTRAP |
private static ExecutorService |
field_24477 |
private static Logger |
LOGGER |
static LongSupplier |
nanoTimeSupplier |
private static AtomicInteger |
NEXT_SERVER_WORKER_ID |
static UUID |
NIL_UUID |
private static ExecutorService |
SERVER_WORKER_EXECUTOR |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static <V> CompletableFuture<List<V>> |
combine(List<? extends CompletableFuture<? extends V>> futures) |
static <T> CompletableFuture<T> |
completeExceptionally(Throwable throwable) |
static String |
createTranslationKey(String type,
Identifier id) |
static Runnable |
debugRunnable(Runnable runnable,
Supplier<String> messageSupplier) |
static long |
getEpochTimeMs() |
static String |
getInnermostMessage(Throwable t) |
static Stream<String> |
getJVMFlags() |
static <T> T |
getLast(List<T> list) |
static long |
getMeasuringTimeMs() |
static long |
getMeasuringTimeNano() |
static Util.OperatingSystem |
getOperatingSystem() |
static int |
getRandom(int[] array,
Random random) |
static <T> T |
getRandom(T[] array,
Random random) |
static Executor |
getServerWorkerExecutor() |
static <T extends Comparable<T>> |
getValueAsString(Property<T> property,
Object object) |
static <K> it.unimi.dsi.fastutil.Hash.Strategy<K> |
identityHashStrategy() |
static <T> Optional<T> |
ifPresentOrElse(Optional<T> optional,
Consumer<T> consumer,
Runnable runnable) |
static <T> T |
make(Supplier<T> factory) |
static <T> T |
make(T object,
Consumer<T> initializer) |
private static void |
method_18347(Thread thread,
Throwable throwable) |
static void |
method_27760(File file,
File file2,
File file3) |
private static void |
method_27957(ExecutorService executorService) |
static Executor |
method_27958() |
private static ExecutorService |
method_27959() |
private static ExecutorService |
method_28122(String string) |
static Executor |
method_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 void |
method_29476() |
static void |
method_29775(Path path,
Path path2,
Path path3) |
static int |
moveCursor(String string,
int cursor,
int delta)
Moves the
cursor in the string by a delta amount. |
static <T> T |
next(Iterable<T> iterable,
T t) |
static <T> T |
previous(Iterable<T> iterable,
T t) |
static void |
shutdownServerWorkerExecutor() |
static <T> Stream<T> |
stream(Optional<? extends T> optional) |
static <T extends Throwable> |
throwOrPause(T t) |
static void |
throwUnchecked(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() |
private static final AtomicInteger NEXT_SERVER_WORKER_ID
private static final ExecutorService BOOTSTRAP
private static final ExecutorService SERVER_WORKER_EXECUTOR
private static final ExecutorService field_24477
public static LongSupplier nanoTimeSupplier
public static final UUID NIL_UUID
private static final Logger LOGGER
public static <T extends Comparable<T>> String getValueAsString(Property<T> property, Object object)
public static String createTranslationKey(String type, @Nullable Identifier id)
public static long getMeasuringTimeMs()
public static long getMeasuringTimeNano()
public static long getEpochTimeMs()
private static ExecutorService method_28122(String string)
public static Executor method_28124()
public static Executor getServerWorkerExecutor()
public static Executor method_27958()
public static void shutdownServerWorkerExecutor()
private static void method_27957(ExecutorService executorService)
private static ExecutorService method_27959()
@Environment(value=CLIENT) public static <T> CompletableFuture<T> completeExceptionally(Throwable throwable)
@Environment(value=CLIENT) public static void throwUnchecked(Throwable throwable)
@Nullable public static com.mojang.datafixers.types.Type<?> method_29187(com.mojang.datafixers.DSL.TypeReference typeReference, String string)
@Nullable private static com.mojang.datafixers.types.Type<?> method_29191(com.mojang.datafixers.DSL.TypeReference typeReference, String string)
public static Util.OperatingSystem getOperatingSystem()
public static <T> T getLast(List<T> list)
public static <T> T make(Supplier<T> factory)
public static <T> T make(T object,
Consumer<T> initializer)
public static <K> it.unimi.dsi.fastutil.Hash.Strategy<K> identityHashStrategy()
public static <V> CompletableFuture<List<V>> combine(List<? extends CompletableFuture<? extends V>> futures)
public static <T> Optional<T> ifPresentOrElse(Optional<T> optional, Consumer<T> consumer, Runnable runnable)
public static Runnable debugRunnable(Runnable runnable, Supplier<String> messageSupplier)
public static <T extends Throwable> T throwOrPause(T t)
public static <T> T getRandom(T[] array,
Random random)
public static int getRandom(int[] array,
Random random)
@Environment(value=CLIENT) public static int moveCursor(String string, int cursor, int delta)
cursor in the string by a delta amount.
Skips surrogate characters.public static com.mojang.serialization.DataResult<int[]> toIntArray(IntStream intStream, int length)
public static void method_29476()
@Environment(value=CLIENT) public static void method_29775(Path path, Path path2, Path path3) throws IOException
IOException