public class Util
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Util.IdentityStrategy |
static class |
Util.OS |
Modifier and Type | Field and Description |
---|---|
private static org.apache.logging.log4j.Logger |
LOGGER |
static java.util.function.LongSupplier |
nanoTimeSupplier |
private static java.util.concurrent.atomic.AtomicInteger |
NEXT_SERVER_WORKER_ID |
private static java.util.concurrent.ExecutorService |
SERVER_EXECUTOR |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.Optional<T> |
acceptOrElse(java.util.Optional<T> opt,
java.util.function.Consumer<T> consumer,
java.lang.Runnable orElse) |
static <T> java.util.concurrent.CompletableFuture<T> |
completedExceptionallyFuture(java.lang.Throwable throwableIn) |
private static java.util.concurrent.ExecutorService |
createServerExecutor() |
static <V> java.util.concurrent.CompletableFuture<java.util.List<V>> |
gather(java.util.List<? extends java.util.concurrent.CompletableFuture<? extends V>> futuresIn) |
static <T> T |
getElementAfter(java.lang.Iterable<T> iterable,
T element) |
static <T> T |
getElementBefore(java.lang.Iterable<T> iterable,
T current) |
static java.util.stream.Stream<java.lang.String> |
getJvmFlags() |
static <T> T |
getLast(java.util.List<T> listIn) |
static java.lang.String |
getMessage(java.lang.Throwable throwableIn) |
static Util.OS |
getOSType() |
static java.util.concurrent.Executor |
getServerExecutor() |
static <T extends java.lang.Comparable<T>> |
getValueName(IProperty<T> property,
java.lang.Object value) |
static <K> it.unimi.dsi.fastutil.Hash.Strategy<K> |
identityHashStrategy() |
static <T> T |
make(java.util.function.Supplier<T> supplier) |
static <T> T |
make(T object,
java.util.function.Consumer<T> consumer) |
static java.lang.String |
makeTranslationKey(java.lang.String type,
ResourceLocation id) |
static long |
millisecondsSinceEpoch() |
static long |
milliTime() |
static java.lang.Runnable |
namedRunnable(java.lang.Runnable runnableIn,
java.util.function.Supplier<java.lang.String> supplierIn) |
static long |
nanoTime() |
static <T extends java.lang.Throwable> |
pauseDevMode(T throwableIn) |
static java.util.Optional<java.util.UUID> |
readUUID(java.lang.String stringIn,
com.mojang.datafixers.Dynamic<?> dynamicIn) |
static void |
shutdownServerExecutor() |
static <T> java.util.stream.Stream<T> |
streamOptional(java.util.Optional<? extends T> optionalIn) |
static <K,V> java.util.stream.Collector<java.util.Map.Entry<? extends K,? extends V>,?,java.util.Map<K,V>> |
toMapCollector() |
static void |
toRuntimeException(java.lang.Throwable throwableIn) |
static <T> com.mojang.datafixers.Dynamic<T> |
writeUUID(java.lang.String stringIn,
java.util.UUID uuidIn,
com.mojang.datafixers.Dynamic<T> dynamicIn) |
private static final java.util.concurrent.atomic.AtomicInteger NEXT_SERVER_WORKER_ID
private static final java.util.concurrent.ExecutorService SERVER_EXECUTOR
public static java.util.function.LongSupplier nanoTimeSupplier
private static final org.apache.logging.log4j.Logger LOGGER
public static <K,V> java.util.stream.Collector<java.util.Map.Entry<? extends K,? extends V>,?,java.util.Map<K,V>> toMapCollector()
public static <T extends java.lang.Comparable<T>> java.lang.String getValueName(IProperty<T> property, java.lang.Object value)
public static java.lang.String makeTranslationKey(java.lang.String type, @Nullable ResourceLocation id)
public static long milliTime()
public static long nanoTime()
public static long millisecondsSinceEpoch()
private static java.util.concurrent.ExecutorService createServerExecutor()
public static java.util.concurrent.Executor getServerExecutor()
public static void shutdownServerExecutor()
public static <T> java.util.concurrent.CompletableFuture<T> completedExceptionallyFuture(java.lang.Throwable throwableIn)
public static void toRuntimeException(java.lang.Throwable throwableIn)
public static Util.OS getOSType()
public static java.util.stream.Stream<java.lang.String> getJvmFlags()
public static <T> T getLast(java.util.List<T> listIn)
public static <T> T getElementAfter(java.lang.Iterable<T> iterable, @Nullable T element)
public static <T> T getElementBefore(java.lang.Iterable<T> iterable, @Nullable T current)
public static <T> T make(java.util.function.Supplier<T> supplier)
public static <T> T make(T object, java.util.function.Consumer<T> consumer)
public static <K> it.unimi.dsi.fastutil.Hash.Strategy<K> identityHashStrategy()
public static <V> java.util.concurrent.CompletableFuture<java.util.List<V>> gather(java.util.List<? extends java.util.concurrent.CompletableFuture<? extends V>> futuresIn)
public static <T> java.util.stream.Stream<T> streamOptional(java.util.Optional<? extends T> optionalIn)
public static <T> java.util.Optional<T> acceptOrElse(java.util.Optional<T> opt, java.util.function.Consumer<T> consumer, java.lang.Runnable orElse)
public static java.lang.Runnable namedRunnable(java.lang.Runnable runnableIn, java.util.function.Supplier<java.lang.String> supplierIn)
public static java.util.Optional<java.util.UUID> readUUID(java.lang.String stringIn, com.mojang.datafixers.Dynamic<?> dynamicIn)
public static <T> com.mojang.datafixers.Dynamic<T> writeUUID(java.lang.String stringIn, java.util.UUID uuidIn, com.mojang.datafixers.Dynamic<T> dynamicIn)
public static <T extends java.lang.Throwable> T pauseDevMode(T throwableIn)
public static java.lang.String getMessage(java.lang.Throwable throwableIn)