Package net.minecraft.util
Class Util
java.lang.Object
net.minecraft.util.Util
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ExecutorServiceprivate static final ExecutorServiceprivate static final ExecutorServiceprivate static final org.apache.logging.log4j.Loggerstatic final UUIDstatic LongSupplierprivate static final AtomicInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Executorstatic Executorstatic voidcopyBetweenDirs(Path p_240984_0_, Path p_240984_1_, Path p_240984_2_) private static BooleanSuppliercreateDeleter(Path p_244362_0_) private static BooleanSuppliercreateFileCreatedCheck(Path p_244367_0_) private static BooleanSuppliercreateFileDeletedCheck(Path p_244366_0_) private static BooleanSuppliercreateRenamer(Path p_244363_0_, Path p_244363_1_) static StringdescribeError(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 booleanexecuteInSequence(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> TfindNextInIterable(Iterable<T> p_195647_0_, T p_195647_1_) static <T> TfindPreviousInIterable(Iterable<T> p_195648_0_, T p_195648_1_) static com.mojang.serialization.DataResult<int[]>static longstatic longstatic longgetNanos()static Util.OSstatic <T extends Comparable<T>>
StringgetPropertyName(Property<T> p_200269_0_, Object p_200269_1_) static intstatic <T> Tstatic <K> it.unimi.dsi.fastutil.Hash.Strategy<K>static <T> Optional<T>static ExecutorioPool()static <T> Tstatic <T> Tstatic <T> Tstatic StringmakeDescriptionId(String p_200697_0_, ResourceLocation p_200697_1_) private static ExecutorServicemakeExecutor(String p_240979_0_) private static ExecutorServicestatic Runnablestatic intoffsetByCodepoints(String p_240980_0_, int p_240980_1_, int p_240980_2_) private static voidonThreadException(Thread p_240983_0_, Throwable p_240983_1_) static <T extends Throwable>
TpauseInIde(T p_229757_0_) private static booleanrunWithRetries(int p_244359_0_, String p_244359_1_, BooleanSupplier... p_244359_2_) static voidsafeReplaceFile(File p_240977_0_, File p_240977_1_, File p_240977_2_) static voidsafeReplaceFile(Path p_244364_0_, Path p_244364_1_, Path p_244364_2_) static StringsanitizeName(String p_244361_0_, ICharacterPredicate p_244361_1_) static <V> CompletableFuture<List<V>>sequence(List<? extends CompletableFuture<? extends V>> p_215079_0_) private static voidshutdownExecutor(ExecutorService p_240985_0_) static voidstatic voidstatic voidthrowAsRuntime(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
-