Package net.minecraft
Class Util
java.lang.Object
net.minecraft.Util
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ExecutorServiceprivate static ExecutorServiceprivate static LongSupplierprivate static ExecutorService(package private) static org.apache.logging.log4j.Loggerstatic UUIDstatic LongSupplierprivate static AtomicIntegerstatic FileSystemProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Executorstatic Executorstatic voidcopyBetweenDirs(Path p_137564_, Path p_137565_, Path p_137566_)private static BooleanSuppliercreateDeleter(Path p_137501_)private static BooleanSuppliercreateFileCreatedCheck(Path p_137573_)private static BooleanSuppliercreateFileDeletedCheck(Path p_137562_)private static BooleanSuppliercreateRenamer(Path p_137503_, Path p_137504_)static StringdescribeError(Throwable p_137576_)private static com.mojang.datafixers.types.Type<?>doFetchChoiceType(com.mojang.datafixers.DSL.TypeReference p_137552_, String p_137553_)private static voiddoPause()private static booleanexecuteInSequence(BooleanSupplier... p_137549_)static <T> CompletableFuture<T>failedFuture(Throwable p_137499_)static com.mojang.datafixers.types.Type<?>fetchChoiceType(com.mojang.datafixers.DSL.TypeReference p_137457_, String p_137458_)static <T> TfindNextInIterable(Iterable<T> p_137467_, T p_137468_)static <T> TfindPreviousInIterable(Iterable<T> p_137555_, T p_137556_)static <T> com.mojang.serialization.DataResult<List<T>>static com.mojang.serialization.DataResult<int[]>static longstatic longstatic longgetNanos()static Util.OSstatic <T extends Comparable<T>>
StringgetPropertyName(Property<T> p_137454_, Object p_137455_)static intstatic <T> Tstatic <T> Tstatic <K> it.unimi.dsi.fastutil.Hash.Strategy<K>static <T> Optional<T>static ExecutorioPool()static <T> Tstatic voidlogAndPauseIfInIde(String p_143786_)static <T> Tstatic <T> Tstatic StringmakeDescriptionId(String p_137493_, ResourceLocation p_137494_)private static ExecutorServicemakeExecutor(String p_137478_)private static ExecutorServicestatic <T, U, R> BiFunction<T,U,R>memoize(BiFunction<T,U,R> p_143822_)static <T, R> Function<T,R>static Runnablestatic intoffsetByCodepoints(String p_137480_, int p_137481_, int p_137482_)private static voidonThreadException(Thread p_137496_, Throwable p_137497_)static <T extends Throwable>
TpauseInIde(T p_137571_)private static booleanrunWithRetries(int p_137450_, String p_137451_, BooleanSupplier... p_137452_)static voidsafeReplaceFile(File p_137463_, File p_137464_, File p_137465_)static voidsafeReplaceFile(Path p_137506_, Path p_137507_, Path p_137508_)static StringsanitizeName(String p_137484_, CharPredicate p_137485_)static <V> CompletableFuture<List<V>>sequence(List<? extends CompletableFuture<? extends V>> p_137568_)static <V> CompletableFuture<List<V>>sequenceFailFast(List<? extends CompletableFuture<? extends V>> p_143841_)private static voidshutdownExecutor(ExecutorService p_137532_)static voidstatic voidstatic voidthrowAsRuntime(Throwable p_137560_)toMap()static <T> Stream<T>static RunnablewrapThreadWithTaskName(String p_143788_, Runnable p_143789_)
-
Field Details
-
WORKER_COUNT
-
BOOTSTRAP_EXECUTOR
-
BACKGROUND_EXECUTOR
-
IO_POOL
-
timeSource
-
NIL_UUID
-
ZIP_FILE_SYSTEM_PROVIDER
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
INNER_CLASS_SHIFT
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
toMap
-
getPropertyName
public static <T extends Comparable<T>> String getPropertyName(Property<T> p_137454_, Object p_137455_) -
makeDescriptionId
-
getMillis
public static long getMillis() -
getNanos
public static long getNanos() -
getEpochMillis
public static long getEpochMillis() -
makeExecutor
-
bootstrapExecutor
-
backgroundExecutor
-
ioPool
-
shutdownExecutors
public static void shutdownExecutors() -
shutdownExecutor
-
makeIoExecutor
-
failedFuture
-
throwAsRuntime
-
onThreadException
-
fetchChoiceType
@Nullable public static com.mojang.datafixers.types.Type<?> fetchChoiceType(com.mojang.datafixers.DSL.TypeReference p_137457_, String p_137458_) -
doFetchChoiceType
@Nullable private static com.mojang.datafixers.types.Type<?> doFetchChoiceType(com.mojang.datafixers.DSL.TypeReference p_137552_, String p_137553_) -
wrapThreadWithTaskName
-
getPlatform
-
getVmArguments
-
lastOf
-
findNextInIterable
-
findPreviousInIterable
-
make
-
make
-
identityStrategy
public static <K> it.unimi.dsi.fastutil.Hash.Strategy<K> identityStrategy() -
sequence
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<? extends V>> p_137568_) -
sequenceFailFast
public static <V> CompletableFuture<List<V>> sequenceFailFast(List<? extends CompletableFuture<? extends V>> p_143841_) -
toStream
-
ifElse
-
name
-
logAndPauseIfInIde
-
pauseInIde
-
doPause
private static void doPause() -
describeError
-
getRandom
-
getRandom
-
getRandom
-
createRenamer
-
createDeleter
-
createFileDeletedCheck
-
createFileCreatedCheck
-
executeInSequence
-
runWithRetries
private static boolean runWithRetries(int p_137450_, String p_137451_, BooleanSupplier... p_137452_) -
safeReplaceFile
-
safeReplaceFile
-
offsetByCodepoints
-
prefix
-
fixedSize
public static com.mojang.serialization.DataResult<int[]> fixedSize(IntStream p_137540_, int p_137541_) -
fixedSize
-
startTimerHackThread
public static void startTimerHackThread() -
copyBetweenDirs
public static void copyBetweenDirs(Path p_137564_, Path p_137565_, Path p_137566_) throws IOException- Throws:
IOException
-
sanitizeName
-
memoize
-
memoize
-