Package net.minecraft.util
Class Util
java.lang.Object
net.minecraft.util.Util
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final ExecutorService
private static final ExecutorService
private static final ExecutorService
private static final org.apache.logging.log4j.Logger
static final UUID
static LongSupplier
private static final AtomicInteger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Executor
static Executor
static void
copyBetweenDirs
(Path p_240984_0_, Path p_240984_1_, Path p_240984_2_) private static BooleanSupplier
createDeleter
(Path p_244362_0_) private static BooleanSupplier
createFileCreatedCheck
(Path p_244367_0_) private static BooleanSupplier
createFileDeletedCheck
(Path p_244366_0_) private static BooleanSupplier
createRenamer
(Path p_244363_0_, Path p_244363_1_) static String
describeError
(Throwable p_229758_0_) private static com.mojang.datafixers.types.Type<?>
doFetchChoiceType
(com.mojang.datafixers.DSL.TypeReference p_240990_0_, String p_240990_1_) private static boolean
executeInSequence
(BooleanSupplier... p_244365_0_) static <T> CompletableFuture<T>
failedFuture
(Throwable p_215087_0_) static com.mojang.datafixers.types.Type<?>
fetchChoiceType
(com.mojang.datafixers.DSL.TypeReference p_240976_0_, String p_240976_1_) static <T> T
findNextInIterable
(Iterable<T> p_195647_0_, T p_195647_1_) static <T> T
findPreviousInIterable
(Iterable<T> p_195648_0_, T p_195648_1_) static com.mojang.serialization.DataResult<int[]>
static long
static long
static long
getNanos()
static Util.OS
static <T extends Comparable<T>>
StringgetPropertyName
(Property<T> p_200269_0_, Object p_200269_1_) static int
static <T> T
static <K> it.unimi.dsi.fastutil.Hash.Strategy<K>
static <T> Optional<T>
static Executor
ioPool()
static <T> T
static <T> T
static <T> T
static String
makeDescriptionId
(String p_200697_0_, ResourceLocation p_200697_1_) private static ExecutorService
makeExecutor
(String p_240979_0_) private static ExecutorService
static Runnable
static int
offsetByCodepoints
(String p_240980_0_, int p_240980_1_, int p_240980_2_) private static void
onThreadException
(Thread p_240983_0_, Throwable p_240983_1_) static <T extends Throwable>
TpauseInIde
(T p_229757_0_) private static boolean
runWithRetries
(int p_244359_0_, String p_244359_1_, BooleanSupplier... p_244359_2_) static void
safeReplaceFile
(File p_240977_0_, File p_240977_1_, File p_240977_2_) static void
safeReplaceFile
(Path p_244364_0_, Path p_244364_1_, Path p_244364_2_) static String
sanitizeName
(String p_244361_0_, ICharacterPredicate p_244361_1_) static <V> CompletableFuture<List<V>>
sequence
(List<? extends CompletableFuture<? extends V>> p_215079_0_) private static void
shutdownExecutor
(ExecutorService p_240985_0_) static void
static void
static void
throwAsRuntime
(Throwable p_229756_0_) toMap()
static <T> Stream<T>
-
Field Details
-
WORKER_COUNT
-
BOOTSTRAP_EXECUTOR
-
BACKGROUND_EXECUTOR
-
IO_POOL
-
timeSource
-
NIL_UUID
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
toMap
-
getPropertyName
public static <T extends Comparable<T>> String getPropertyName(Property<T> p_200269_0_, Object p_200269_1_) -
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_240976_0_, String p_240976_1_) -
doFetchChoiceType
@Nullable private static com.mojang.datafixers.types.Type<?> doFetchChoiceType(com.mojang.datafixers.DSL.TypeReference p_240990_0_, String p_240990_1_) -
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_215079_0_) -
toStream
-
ifElse
-
name
-
pauseInIde
-
describeError
-
getRandom
-
getRandom
-
createRenamer
-
createDeleter
-
createFileDeletedCheck
-
createFileCreatedCheck
-
executeInSequence
-
runWithRetries
private static boolean runWithRetries(int p_244359_0_, String p_244359_1_, BooleanSupplier... p_244359_2_) -
safeReplaceFile
-
safeReplaceFile
-
offsetByCodepoints
-
prefix
-
fixedSize
public static com.mojang.serialization.DataResult<int[]> fixedSize(IntStream p_240987_0_, int p_240987_1_) -
startTimerHackThread
public static void startTimerHackThread() -
copyBetweenDirs
public static void copyBetweenDirs(Path p_240984_0_, Path p_240984_1_, Path p_240984_2_) throws IOException - Throws:
IOException
-
sanitizeName
-