net.minecraft

public class Util

ad
net.minecraft.Util
net.minecraft.class_156
net.minecraft.unmapped.C_lvarvugc
net.minecraft.util.Util
net.minecraft.util.Util
net.minecraft.src.C_5322_
net.minecraft.SystemUtils

Field summary

Modifier and TypeField
static final org.slf4j.Logger
e
LOGGER
field_1129
f_faeenrac
LOGGER
LOGGER
f_137446_
private static final int
f
DEFAULT_MAX_THREADS
field_34891
f_taiaktna
MAX_PARALLELISM
DEFAULT_MAX_THREADS
f_183935_
private static final String
g
MAX_THREADS_SYSTEM_PROPERTY
field_34892
f_lamtvexk
MAX_BG_THREADS_PROPERTY
MAX_THREADS_SYSTEM_PROPERTY
f_183936_
private static final AtomicInteger
h
WORKER_COUNT
field_18034
f_gshsyyvs
NEXT_WORKER_ID
NEXT_WORKER_ID
f_137442_
private static final ExecutorService
i
BOOTSTRAP_EXECUTOR
field_24622
f_mwatldea
BOOTSTRAP_EXECUTOR
BOOTSTRAP_EXECUTOR
f_137443_
private static final ExecutorService
j
BACKGROUND_EXECUTOR
field_18035
f_zimcxepj
MAIN_WORKER_EXECUTOR
MAIN_WORKER_EXECUTOR
f_137444_
private static final ExecutorService
k
IO_POOL
field_24477
f_kmtdmvfj
IO_WORKER_EXECUTOR
IO_WORKER_EXECUTOR
f_137445_
public static LongSupplier
a
timeSource
field_1128
f_qqybtqnr
nanoTimeSupplier
nanoTimeSupplier
f_137440_
public static final com.google.common.base.Ticker
b
TICKER
field_37250
f_gsxvektl
TICKER
TICKER
f_211544_
public static final UUID
c
NIL_UUID
field_25140
f_ahvemmlp
NIL_UUID
NIL_UUID
f_137441_
public static final FileSystemProvider
d
ZIP_FILE_SYSTEM_PROVIDER
field_33859
f_pshbhhha
JAR_FILE_SYSTEM_PROVIDER
JAR_FILE_SYSTEM_PROVIDER
f_143778_
private static Consumer<String>
l
thePauser
field_34893
f_wikbskzx
missingBreakpointHandler
breakpointPauser
f_183937_

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
public static <K, V> Collector<Map$Entry<? extends K, ? extends V>, ?, Map<K, V>>
a()
toMap()
method_664()
m_ftciccth()
toMap()
toMap()
m_137448_()
public static <T extends Comparable<T>> String
a(cpy<T> arg0, Object arg1)
getPropertyName(Property<T> arg0, Object arg1)
method_650(class_2769<T> arg0, Object arg1)
m_vgutcxlm(C_vzlztuyw<T> arg0, Object arg1)
getValueAsString(Property<T> property, Object value)
getValueAsString(Property<T> property, Object value)
m_137453_(C_2097_<T> p_137454_, Object p_137455_)
public static String
a(String arg0, yt arg1)
makeDescriptionId(String arg0, ResourceLocation arg1)
method_646(String arg0, class_2960 arg1)
m_wpeqdapc(String arg0, C_ncpywfca arg1)
createTranslationKey(String type, Identifier id)
createTranslationKey(String type, Identifier id)
m_137492_(String p_137493_, C_5265_ p_137494_)
public static long
b()
getMillis()
method_658()
m_qjjrrmre()
getMeasuringTimeMs()
getMeasuringTimeMs()
m_137550_()
public static long
c()
getNanos()
method_648()
m_xtrebjef()
getMeasuringTimeNano()
getMeasuringTimeNano()
m_137569_()
public static long
d()
getEpochMillis()
method_659()
m_elihuwxg()
getEpochTimeMs()
getEpochTimeMs()
m_137574_()
private static ExecutorService
b(String arg0)
makeExecutor(String arg0)
method_28122(String arg0)
m_mytcolvj(String arg0)
createWorker(String name)
createWorker(String name)
m_137477_(String p_137478_)
private static int
m()
getMaxThreads()
method_38648()
m_chvwiayy()
getMaxBackgroundThreads()
getMaxBackgroundThreads()
m_183993_()
public static ExecutorService
e()
bootstrapExecutor()
method_28124()
m_wbsjgjfk()
getBootstrapExecutor()
getBootstrapExecutor()
m_183988_()
public static ExecutorService
f()
backgroundExecutor()
method_18349()
m_hnnezaif()
getMainWorkerExecutor()
getMainWorkerExecutor()
m_183991_()
public static ExecutorService
g()
ioPool()
method_27958()
m_gatbnpas()
getIoWorkerExecutor()
getIoWorkerExecutor()
m_183992_()
public static void
h()
shutdownExecutors()
method_18350()
m_kcnenfvs()
shutdownExecutors()
shutdownExecutors()
m_137580_()
private static void
a(ExecutorService arg0)
shutdownExecutor(ExecutorService arg0)
method_27957(ExecutorService arg0)
m_oaamqqhk(ExecutorService arg0)
attemptShutdown(ExecutorService service)
attemptShutdown(ExecutorService service)
m_137531_(ExecutorService p_137532_)
private static ExecutorService
n()
makeIoExecutor()
method_27959()
m_wkoofosm()
createIoWorker()
createIoWorker()
m_137586_()
public static <T> CompletableFuture<T>
a(Throwable arg0)
failedFuture(Throwable arg0)
method_19483(Throwable arg0)
m_wgykosui(Throwable arg0)
completeExceptionally(Throwable throwable)
completeExceptionally(Throwable throwable)
m_137498_(Throwable p_137499_)
public static void
b(Throwable arg0)
throwAsRuntime(Throwable arg0)
method_24155(Throwable arg0)
m_vgcxoqmg(Throwable arg0)
throwUnchecked(Throwable t)
throwUnchecked(Throwable t)
m_137559_(Throwable p_137560_)
private static void
a(Thread arg0, Throwable arg1)
onThreadException(Thread arg0, Throwable arg1)
method_18347(Thread arg0, Throwable arg1)
m_eprinqay(Thread arg0, Throwable arg1)
uncaughtExceptionHandler(Thread thread, Throwable t)
uncaughtExceptionHandler(Thread thread, Throwable t)
m_137495_(Thread p_137496_, Throwable p_137497_)
public static com.mojang.datafixers.types.Type<?>
a(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
fetchChoiceType(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
method_29187(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
m_yvfdsqix(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
getChoiceType(com.mojang.datafixers.DSL$TypeReference typeReference, String id)
getChoiceType(com.mojang.datafixers.DSL$TypeReference typeReference, String id)
m_137456_(com.mojang.datafixers.DSL$TypeReference p_137457_, String p_137458_)
private static com.mojang.datafixers.types.Type<?>
b(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
doFetchChoiceType(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
method_29191(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
m_cclbyaoh(com.mojang.datafixers.DSL$TypeReference arg0, String arg1)
getChoiceTypeInternal(com.mojang.datafixers.DSL$TypeReference typeReference, String id)
getChoiceTypeInternal(com.mojang.datafixers.DSL$TypeReference typeReference, String id)
m_137551_(com.mojang.datafixers.DSL$TypeReference p_137552_, String p_137553_)
public static Runnable
a(String arg0, Runnable arg1)
wrapThreadWithTaskName(String arg0, Runnable arg1)
method_33787(String arg0, Runnable arg1)
m_ucqgdvxm(String arg0, Runnable arg1)
debugRunnable(String activeThreadName, Runnable task)
debugRunnable(String activeThreadName, Runnable runnable)
m_143787_(String p_143788_, Runnable p_143789_)
public static <V> Supplier<V>
a(String arg0, Supplier<V> arg1)
wrapThreadWithTaskName(String arg0, Supplier<V> arg1)
method_37910(String arg0, Supplier<V> arg1)
m_egytkosb(String arg0, Supplier<V> arg1)
debugSupplier(String activeThreadName, Supplier<V> supplier)
debugSupplier(String activeThreadName, Supplier<V> supplier)
m_183946_(String p_183947_, Supplier<V> p_183948_)
public static Util$OS
i()
getPlatform()
method_668()
m_rmfqlirq()
getOperatingSystem()
getOperatingSystem()
m_137581_()
public static Stream<String>
j()
getVmArguments()
method_651()
m_fppetslt()
getJVMFlags()
getJVMFlags()
m_137582_()
public static <T> T
a(List<T> arg0)
lastOf(List<T> arg0)
method_20793(List<T> arg0)
m_jzncpgce(List<T> arg0)
getLast(List<T> list)
getLast(List<T> list)
m_137509_(List<T> p_137510_)
public static <T> T
a(Iterable<T> arg0, T arg1)
findNextInIterable(Iterable<T> arg0, T arg1)
method_660(Iterable<T> arg0, T arg1)
m_nshqaczo(Iterable<T> arg0, T arg1)
next(Iterable<T> iterable, T object)
next(Iterable<T> iterable, T object)
m_137466_(Iterable<T> p_137467_, T p_137468_)
public static <T> T
b(Iterable<T> arg0, T arg1)
findPreviousInIterable(Iterable<T> arg0, T arg1)
method_645(Iterable<T> arg0, T arg1)
m_vcjnmiex(Iterable<T> arg0, T arg1)
previous(Iterable<T> iterable, T object)
previous(Iterable<T> iterable, T object)
m_137554_(Iterable<T> p_137555_, T p_137556_)
public static <T> T
a(Supplier<T> arg0)
make(Supplier<T> arg0)
method_656(Supplier<T> arg0)
m_wwakmmib(Supplier<T> arg0)
make(Supplier<T> factory)
make(Supplier<T> factory)
m_137537_(Supplier<T> p_137538_)
public static <T> T
a(T arg0, Consumer<T> arg1)
make(T arg0, Consumer<T> arg1)
method_654(T arg0, Consumer<T> arg1)
m_ewfqjfze(T arg0, Consumer<T> arg1)
make(T object, Consumer<T> initializer)
make(T object, Consumer<T> initializer)
m_137469_(T p_137470_, Consumer<T> p_137471_)
public static <K> it.unimi.dsi.fastutil.Hash$Strategy<K>
k()
identityStrategy()
method_655()
m_lbsfwkrf()
identityHashStrategy()
identityHashStrategy()
m_137583_()
public static <V> CompletableFuture<List<V>>
b(List<? extends CompletableFuture<V>> arg0)
sequence(List<? extends CompletableFuture<V>> arg0)
method_33791(List<? extends CompletableFuture<V>> arg0)
m_kpixdiyc(List<? extends CompletableFuture<V>> arg0)
combineSafe(List<? extends CompletableFuture<V>> futures)
combineSafe(List<? extends CompletableFuture<V>> futures)
m_137567_(List<? extends CompletableFuture<V>> p_137568_)
public static <V> CompletableFuture<List<V>>
c(List<? extends CompletableFuture<? extends V>> arg0)
sequenceFailFast(List<? extends CompletableFuture<? extends V>> arg0)
method_652(List<? extends CompletableFuture<? extends V>> arg0)
m_wbwlvhhn(List<? extends CompletableFuture<? extends V>> arg0)
combine(List<? extends CompletableFuture<? extends V>> futures)
combine(List<? extends CompletableFuture<? extends V>> futures)
m_143840_(List<? extends CompletableFuture<? extends V>> p_143841_)
public static <T> Optional<T>
a(Optional<T> arg0, Consumer<T> arg1, Runnable arg2)
ifElse(Optional<T> arg0, Consumer<T> arg1, Runnable arg2)
method_17974(Optional<T> arg0, Consumer<T> arg1, Runnable arg2)
m_qpdauvpg(Optional<T> arg0, Consumer<T> arg1, Runnable arg2)
ifPresentOrElse(Optional<T> optional, Consumer<T> presentAction, Runnable elseAction)
ifPresentOrElse(Optional<T> optional, Consumer<T> presentAction, Runnable elseAction)
m_137521_(Optional<T> p_137522_, Consumer<T> p_137523_, Runnable p_137524_)
public static Runnable
a(Runnable arg0, Supplier<String> arg1)
name(Runnable arg0, Supplier<String> arg1)
method_18839(Runnable arg0, Supplier<String> arg1)
m_skylxoye(Runnable arg0, Supplier<String> arg1)
debugRunnable(Runnable runnable, Supplier<String> messageSupplier)
debugRunnable(Runnable runnable, Supplier<String> messageSupplier)
m_137474_(Runnable p_137475_, Supplier<String> p_137476_)
public static void
a(String arg0)
logAndPauseIfInIde(String arg0)
method_33559(String arg0)
m_uocsgxgb(String arg0)
error(String message)
logAndPause(String message)
m_143785_(String p_143786_)
public static void
a(String arg0, Throwable arg1)
logAndPauseIfInIde(String arg0, Throwable arg1)
method_39977(String arg0, Throwable arg1)
m_ngxcbtrh(String arg0, Throwable arg1)
error(String message, Throwable throwable)
logAndPause(String message, Throwable t)
m_200890_(String p_200891_, Throwable p_200892_)
public static <T extends Throwable> T
c(T arg0)
pauseInIde(T arg0)
method_22320(T arg0)
m_eguhqvxr(T arg0)
throwOrPause(T t)
throwOrPause(T t)
m_137570_(T p_137571_)
public static void
a(Consumer<String> arg0)
setPause(Consumer<String> arg0)
method_38646(Consumer<String> arg0)
m_ffmggoki(Consumer<String> arg0)
setMissingBreakpointHandler(Consumer<String> missingBreakpointHandler)
setBreakpointPauser(Consumer<String> breakpointPauser)
m_183969_(Consumer<String> p_183970_)
private static void
c(String arg0)
doPause(String arg0)
method_33560(String arg0)
m_dxqrqrhx(String arg0)
pause(String message)
pause(String message)
m_183984_(String p_183985_)
public static String
d(Throwable arg0)
describeError(Throwable arg0)
method_22321(Throwable arg0)
m_gxlhducm(Throwable arg0)
getInnermostMessage(Throwable t)
getInnermostMessage(Throwable t)
m_137575_(Throwable p_137576_)
public static <T> T
a(T[] arg0, Random arg1)
getRandom(T[] arg0, Random arg1)
method_27173(T[] arg0, Random arg1)
m_vyeltxpm(T[] arg0, Random arg1)
getRandom(T[] array, Random random)
getRandom(T[] array, Random random)
m_137545_(T[] p_137546_, Random p_137547_)
public static int
a(int[] arg0, Random arg1)
getRandom(int[] arg0, Random arg1)
method_27172(int[] arg0, Random arg1)
m_poeexonq(int[] arg0, Random arg1)
getRandom(int[] array, Random random)
getRandom(int[] array, Random random)
m_137542_(int[] p_137543_, Random p_137544_)
public static <T> T
a(List<T> arg0, Random arg1)
getRandom(List<T> arg0, Random arg1)
method_32309(List<T> arg0, Random arg1)
m_vmhdtbqg(List<T> arg0, Random arg1)
getRandom(List<T> list, Random random)
getRandomUnsafe(List<T> list, Random random)
m_143804_(List<T> p_143805_, Random p_143806_)
public static <T> Optional<T>
b(List<T> arg0, Random arg1)
getRandomSafe(List<T> arg0, Random arg1)
method_40083(List<T> arg0, Random arg1)
m_liaesfeu(List<T> arg0, Random arg1)
getRandomOrEmpty(List<T> list, Random random)
getRandom(List<T> list, Random random)
m_203747_(List<T> p_203748_, Random p_203749_)
private static BooleanSupplier
a(Path arg0, Path arg1)
createRenamer(Path arg0, Path arg1)
method_30625(Path arg0, Path arg1)
m_lyrrqjlr(Path arg0, Path arg1)
renameTask(Path src, Path dest)
renameTask(Path src, Path dest)
m_137502_(Path p_137503_, Path p_137504_)
private static BooleanSupplier
a(Path arg0)
createDeleter(Path arg0)
method_30624(Path arg0)
m_kbwjpgkm(Path arg0)
deleteTask(Path path)
deleteTask(Path path)
m_137500_(Path p_137501_)
private static BooleanSupplier
b(Path arg0)
createFileDeletedCheck(Path arg0)
method_30628(Path arg0)
m_teucbfzd(Path arg0)
deletionVerifyTask(Path path)
deletionVerifyTask(Path path)
m_137561_(Path p_137562_)
private static BooleanSupplier
c(Path arg0)
createFileCreatedCheck(Path arg0)
method_30629(Path arg0)
m_aidzvymm(Path arg0)
existenceCheckTask(Path path)
existenceCheckTask(Path path)
m_137572_(Path p_137573_)
private static boolean
a(BooleanSupplier... arg0)
executeInSequence(BooleanSupplier... arg0)
method_30627(BooleanSupplier... arg0)
m_uduxgasu(BooleanSupplier... arg0)
attemptTasks(BooleanSupplier... tasks)
attemptTasks(BooleanSupplier... tasks)
m_137548_(BooleanSupplier... p_137549_)
private static boolean
a(int arg0, String arg1, BooleanSupplier... arg2)
runWithRetries(int arg0, String arg1, BooleanSupplier... arg2)
method_30622(int arg0, String arg1, BooleanSupplier... arg2)
m_yrtzlgsc(int arg0, String arg1, BooleanSupplier... arg2)
attemptTasks(int retries, String taskName, BooleanSupplier... tasks)
attemptTasks(int retries, String taskName, BooleanSupplier... tasks)
m_137449_(int p_137450_, String p_137451_, BooleanSupplier... p_137452_)
public static void
a(File arg0, File arg1, File arg2)
safeReplaceFile(File arg0, File arg1, File arg2)
method_27760(File arg0, File arg1, File arg2)
m_gteslhvq(File arg0, File arg1, File arg2)
backupAndReplace(File current, File newFile, File backup)
backupAndReplace(File current, File newFile, File backup)
m_137462_(File p_137463_, File p_137464_, File p_137465_)
public static void
a(Path arg0, Path arg1, Path arg2)
safeReplaceFile(Path arg0, Path arg1, Path arg2)
method_30626(Path arg0, Path arg1, Path arg2)
m_qfufoqzt(Path arg0, Path arg1, Path arg2)
backupAndReplace(Path current, Path newPath, Path backup)
backupAndReplace(Path current, Path newPath, Path backup)
m_137505_(Path p_137506_, Path p_137507_, Path p_137508_)
public static void
a(File arg0, File arg1, File arg2, boolean arg3)
safeReplaceOrMoveFile(File arg0, File arg1, File arg2, boolean arg3)
method_41203(File arg0, File arg1, File arg2, boolean arg3)
m_tcuyutyn(File arg0, File arg1, File arg2, boolean arg3)
backupAndReplace(File current, File newPath, File backup, boolean noRestoreOnFail)
backupAndReplace(File current, File newFile, File backup, boolean discardOnFail)
m_212224_(File p_212225_, File p_212226_, File p_212227_, boolean p_212228_)
public static void
a(Path arg0, Path arg1, Path arg2, boolean arg3)
safeReplaceOrMoveFile(Path arg0, Path arg1, Path arg2, boolean arg3)
method_41204(Path arg0, Path arg1, Path arg2, boolean arg3)
m_royqyqxg(Path arg0, Path arg1, Path arg2, boolean arg3)
backupAndReplace(Path current, Path newPath, Path backup, boolean noRestoreOnFail)
backupAndReplace(Path current, Path newPath, Path backup, boolean discardOnFail)
m_212229_(Path p_212230_, Path p_212231_, Path p_212232_, boolean p_212233_)
public static int
a(String arg0, int arg1, int arg2)
offsetByCodepoints(String arg0, int arg1, int arg2)
method_27761(String arg0, int arg1, int arg2)
m_vwigcqkp(String arg0, int arg1, int arg2)
moveCursor(String string, int cursor, int delta)
moveCursor(String string, int cursor, int delta)
m_137479_(String p_137480_, int p_137481_, int p_137482_)
public static Consumer<String>
a(String arg0, Consumer<String> arg1)
prefix(String arg0, Consumer<String> arg1)
method_29188(String arg0, Consumer<String> arg1)
m_wpgsfqzf(String arg0, Consumer<String> arg1)
addPrefix(String prefix, Consumer<String> consumer)
addPrefix(String prefix, Consumer<String> consumer)
m_137489_(String p_137490_, Consumer<String> p_137491_)
public static com.mojang.serialization.DataResult<int[]>
a(IntStream arg0, int arg1)
fixedSize(IntStream arg0, int arg1)
method_29190(IntStream arg0, int arg1)
m_drhjlchv(IntStream arg0, int arg1)
toArray(IntStream stream, int length)
fixedSizeList(IntStream stream, int length)
m_137539_(IntStream p_137540_, int p_137541_)
public static <T> com.mojang.serialization.DataResult<List<T>>
a(List<T> arg0, int arg1)
fixedSize(List<T> arg0, int arg1)
method_33141(List<T> arg0, int arg1)
m_awkdanrv(List<T> arg0, int arg1)
toArray(List<T> list, int length)
fixedSizeList(List<T> list, int length)
m_143795_(List<T> p_143796_, int p_143797_)
public static void
l()
startTimerHackThread()
method_29476()
m_oigccakw()
startTimerHack()
startTimerHack()
m_137584_()
public static void
b(Path arg0, Path arg1, Path arg2)
copyBetweenDirs(Path arg0, Path arg1, Path arg2)
method_29775(Path arg0, Path arg1, Path arg2)
m_ydhyxwlc(Path arg0, Path arg1, Path arg2)
relativeCopy(Path src, Path dest, Path toCopy)
relativeCopy(Path src, Path dest, Path toCopy)
m_137563_(Path p_137564_, Path p_137565_, Path p_137566_)
public static String
a(String arg0, o arg1)
sanitizeName(String arg0, CharPredicate arg1)
method_30309(String arg0, class_5462 arg1)
m_lgfbfuzz(String arg0, C_zpuwkbhr arg1)
replaceInvalidChars(String string, CharPredicate predicate)
replaceInvalidChars(String string, CharPredicate predicate)
m_137483_(String p_137484_, C_4824_ p_137485_)
public static <T, R> Function<T, R>
a(Function<T, R> arg0)
memoize(Function<T, R> arg0)
method_34866(Function<T, R> arg0)
m_gdspwjqr(Function<T, R> arg0)
memoize(Function<T, R> function)
memoize(Function<T, R> function)
m_143827_(Function<T, R> p_143828_)
public static <T, U, R> BiFunction<T, U, R>
a(BiFunction<T, U, R> arg0)
memoize(BiFunction<T, U, R> arg0)
method_34865(BiFunction<T, U, R> arg0)
m_ecvsiggs(BiFunction<T, U, R> arg0)
memoize(BiFunction<T, U, R> biFunction)
memoize(BiFunction<T, U, R> biFunction)
m_143821_(BiFunction<T, U, R> p_143822_)