net.minecraft

public class Util

ag
net.minecraft.Util
net.minecraft.class_156

Field summary

Modifier and TypeField
static final org.slf4j.Logger
g
LOGGER
field_1129
private static final int
h
DEFAULT_MAX_THREADS
field_34891
private static final int
i
DEFAULT_SAFE_FILE_OPERATION_RETRIES
field_46764
private static final String
j
MAX_THREADS_SYSTEM_PROPERTY
field_34892
private static final TracingExecutor
k
BACKGROUND_EXECUTOR
field_18035
private static final TracingExecutor
l
IO_POOL
field_24477
private static final TracingExecutor
m
DOWNLOAD_POOL
field_47571
private static final DateTimeFormatter
n
FILENAME_DATE_TIME_FORMATTER
field_39824
public static final int
a
LINEAR_LOOKUP_THRESHOLD
field_46220
private static final Set<String>
o
ALLOWED_UNTRUSTED_LINK_PROTOCOLS
field_52196
public static final long
b
NANOS_PER_MILLI
field_45714
public static TimeSource$NanoTimeSource
c
timeSource
field_1128
public static final com.google.common.base.Ticker
d
TICKER
field_37250
public static final UUID
e
NIL_UUID
field_25140
public static final FileSystemProvider
f
ZIP_FILE_SYSTEM_PROVIDER
field_33859
private static Consumer<String>
p
thePauser
field_34893

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()
public static <T> Collector<T, ?, List<T>>
b()
toMutableList()
method_58579()
public static <T extends Comparable<T>> String
a(edj<T> arg0, Object arg1)
getPropertyName(Property<T> arg0, Object arg1)
method_650(class_2769<T> arg0, Object arg1)
public static String
a(String arg0, alw arg1)
makeDescriptionId(String arg0, ResourceLocation arg1)
method_646(String arg0, class_2960 arg1)
public static long
c()
getMillis()
method_658()
public static long
d()
getNanos()
method_648()
public static long
e()
getEpochMillis()
method_659()
public static String
f()
getFilenameFormattedDateTime()
method_44893()
private static TracingExecutor
c(String arg0)
makeExecutor(String arg0)
method_28122(String arg0)
public static int
g()
maxAllowedExecutorThreads()
method_65951()
private static int
q()
getMaxThreads()
method_38648()
public static TracingExecutor
h()
backgroundExecutor()
method_18349()
public static TracingExecutor
i()
ioPool()
method_27958()
public static TracingExecutor
j()
nonCriticalIoPool()
method_55473()
public static void
k()
shutdownExecutors()
method_18350()
private static TracingExecutor
a(String arg0, boolean arg1)
makeIoExecutor(String arg0, boolean arg1)
method_27959(String arg0, boolean arg1)
public static void
a(Throwable arg0)
throwAsRuntime(Throwable arg0)
method_24155(Throwable arg0)
private static void
a(Thread arg0, Throwable arg1)
onThreadException(Thread arg0, Throwable arg1)
method_18347(Thread arg0, Throwable arg1)
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)
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)
public static void
a(Runnable arg0, String arg1)
runNamed(Runnable arg0, String arg1)
method_64122(Runnable arg0, String arg1)
public static <T> String
a(jv<T> arg0, T arg1)
getRegisteredName(Registry<T> arg0, T arg1)
method_57107(class_2378<T> arg0, T arg1)
public static <T> Predicate<T>
l()
allOf()
method_61210()
public static <T> Predicate<T>
a(Predicate<? super T> arg0)
allOf(Predicate<? super T> arg0)
method_61189(Predicate<? super T> arg0)
public static <T> Predicate<T>
a(Predicate<? super T> arg0, Predicate<? super T> arg1)
allOf(Predicate<? super T> arg0, Predicate<? super T> arg1)
method_61190(Predicate<? super T> arg0, Predicate<? super T> arg1)
public static <T> Predicate<T>
a(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
allOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
method_61192(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
public static <T> Predicate<T>
a(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
allOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
method_61194(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
public static <T> Predicate<T>
a(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
allOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
method_61196(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
public static <T> Predicate<T>
a(Predicate<? super T>... arg0)
allOf(Predicate<? super T>... arg0)
method_61198(Predicate<? super T>... arg0)
public static <T> Predicate<T>
a(List<? extends Predicate<? super T>> arg0)
allOf(List<? extends Predicate<? super T>> arg0)
method_56613(List<? extends Predicate<? super T>> arg0)
public static <T> Predicate<T>
m()
anyOf()
method_61211()
public static <T> Predicate<T>
b(Predicate<? super T> arg0)
anyOf(Predicate<? super T> arg0)
method_61199(Predicate<? super T> arg0)
public static <T> Predicate<T>
b(Predicate<? super T> arg0, Predicate<? super T> arg1)
anyOf(Predicate<? super T> arg0, Predicate<? super T> arg1)
method_61200(Predicate<? super T> arg0, Predicate<? super T> arg1)
public static <T> Predicate<T>
b(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
anyOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
method_61202(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2)
public static <T> Predicate<T>
b(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
anyOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
method_61204(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3)
public static <T> Predicate<T>
b(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
anyOf(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
method_61206(Predicate<? super T> arg0, Predicate<? super T> arg1, Predicate<? super T> arg2, Predicate<? super T> arg3, Predicate<? super T> arg4)
public static <T> Predicate<T>
b(Predicate<? super T>... arg0)
anyOf(Predicate<? super T>... arg0)
method_61208(Predicate<? super T>... arg0)
public static <T> Predicate<T>
b(List<? extends Predicate<? super T>> arg0)
anyOf(List<? extends Predicate<? super T>> arg0)
method_56616(List<? extends Predicate<? super T>> arg0)
public static <T> boolean
a(int arg0, int arg1, List<T> arg2)
isSymmetrical(int arg0, int arg1, List<T> arg2)
method_59901(int arg0, int arg1, List<T> arg2)
public static int
a(int arg0, int arg1)
growByHalf(int arg0, int arg1)
method_68172(int arg0, int arg1)
public static Util$OS
n()
getPlatform()
method_668()
public static URI
a(String arg0)
parseAndValidateUntrustedUri(String arg0)
method_60931(String arg0)
public static Stream<String>
o()
getVmArguments()
method_651()
public static <T> T
c(List<T> arg0)
lastOf(List<T> arg0)
method_20793(List<T> arg0)
public static <T> T
a(Iterable<T> arg0, T arg1)
findNextInIterable(Iterable<T> arg0, T arg1)
method_660(Iterable<T> arg0, T arg1)
public static <T> T
b(Iterable<T> arg0, T arg1)
findPreviousInIterable(Iterable<T> arg0, T arg1)
method_645(Iterable<T> arg0, T arg1)
public static <T> T
a(Supplier<T> arg0)
make(Supplier<T> arg0)
method_656(Supplier<T> arg0)
public static <T> T
a(T arg0, Consumer<? super T> arg1)
make(T arg0, Consumer<? super T> arg1)
method_654(T arg0, Consumer<? super T> arg1)
public static <K extends Enum<K>, V> Map<K, V>
a(Class<K> arg0, Function<K, V> arg1)
makeEnumMap(Class<K> arg0, Function<K, V> arg1)
method_63541(Class<K> arg0, Function<K, V> arg1)
public static <K, V1, V2> Map<K, V2>
a(Map<K, V1> arg0, Function<? super V1, V2> arg1)
mapValues(Map<K, V1> arg0, Function<? super V1, V2> arg1)
method_65968(Map<K, V1> arg0, Function<? super V1, V2> arg1)
public static <K, V1, V2> Map<K, V2>
a(Map<K, V1> arg0, com.google.common.base.Function<V1, V2> arg1)
mapValuesLazy(Map<K, V1> arg0, com.google.common.base.Function<V1, V2> arg1)
method_65967(Map<K, V1> arg0, com.google.common.base.Function<V1, V2> arg1)
public static <V> CompletableFuture<List<V>>
d(List<? extends CompletableFuture<V>> arg0)
sequence(List<? extends CompletableFuture<V>> arg0)
method_33791(List<? extends CompletableFuture<V>> arg0)
public static <V> CompletableFuture<List<V>>
e(List<? extends CompletableFuture<? extends V>> arg0)
sequenceFailFast(List<? extends CompletableFuture<? extends V>> arg0)
method_652(List<? extends CompletableFuture<? extends V>> arg0)
public static <V> CompletableFuture<List<V>>
f(List<? extends CompletableFuture<? extends V>> arg0)
sequenceFailFastAndCancel(List<? extends CompletableFuture<? extends V>> arg0)
method_43373(List<? extends CompletableFuture<? extends V>> arg0)
private static <V> CompletableFuture<List<V>>
a(List<? extends CompletableFuture<? extends V>> arg0, Consumer<Throwable> arg1)
fallibleSequence(List<? extends CompletableFuture<? extends V>> arg0, Consumer<Throwable> arg1)
method_43370(List<? extends CompletableFuture<? extends V>> arg0, Consumer<Throwable> arg1)
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)
public static <T> Supplier<T>
a(Supplier<T> arg0, Supplier<String> arg1)
name(Supplier<T> arg0, Supplier<String> arg1)
method_41238(Supplier<T> arg0, Supplier<String> arg1)
public static Runnable
a(Runnable arg0, Supplier<String> arg1)
name(Runnable arg0, Supplier<String> arg1)
method_18839(Runnable arg0, Supplier<String> arg1)
public static void
b(String arg0)
logAndPauseIfInIde(String arg0)
method_33559(String arg0)
public static void
a(String arg0, Throwable arg1)
logAndPauseIfInIde(String arg0, Throwable arg1)
method_39977(String arg0, Throwable arg1)
public static <T extends Throwable> T
b(T arg0)
pauseInIde(T arg0)
method_22320(T arg0)
public static void
a(Consumer<String> arg0)
setPause(Consumer<String> arg0)
method_38646(Consumer<String> arg0)
private static void
d(String arg0)
doPause(String arg0)
method_33560(String arg0)
public static String
c(Throwable arg0)
describeError(Throwable arg0)
method_22321(Throwable arg0)
public static <T> T
a(T[] arg0, baq arg1)
getRandom(T[] arg0, RandomSource arg1)
method_27173(T[] arg0, class_5819 arg1)
public static int
a(int[] arg0, baq arg1)
getRandom(int[] arg0, RandomSource arg1)
method_27172(int[] arg0, class_5819 arg1)
public static <T> T
a(List<T> arg0, baq arg1)
getRandom(List<T> arg0, RandomSource arg1)
method_32309(List<T> arg0, class_5819 arg1)
public static <T> Optional<T>
b(List<T> arg0, baq arg1)
getRandomSafe(List<T> arg0, RandomSource arg1)
method_40083(List<T> arg0, class_5819 arg1)
private static BooleanSupplier
a(Path arg0, Path arg1)
createRenamer(Path arg0, Path arg1)
method_30625(Path arg0, Path arg1)
private static BooleanSupplier
a(Path arg0)
createDeleter(Path arg0)
method_30624(Path arg0)
private static BooleanSupplier
b(Path arg0)
createFileDeletedCheck(Path arg0)
method_30628(Path arg0)
private static BooleanSupplier
c(Path arg0)
createFileCreatedCheck(Path arg0)
method_30629(Path arg0)
private static boolean
a(BooleanSupplier... arg0)
executeInSequence(BooleanSupplier... arg0)
method_30627(BooleanSupplier... arg0)
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)
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)
public static boolean
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)
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)
public static Consumer<String>
a(String arg0, Consumer<String> arg1)
prefix(String arg0, Consumer<String> arg1)
method_29188(String arg0, Consumer<String> arg1)
public static com.mojang.serialization.DataResult<int[]>
a(IntStream arg0, int arg1)
fixedSize(IntStream arg0, int arg1)
method_29190(IntStream arg0, int arg1)
public static com.mojang.serialization.DataResult<long[]>
a(LongStream arg0, int arg1)
fixedSize(LongStream arg0, int arg1)
method_51822(LongStream arg0, int arg1)
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)
public static void
p()
startTimerHackThread()
method_29476()
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)
public static String
a(String arg0, n arg1)
sanitizeName(String arg0, CharPredicate arg1)
method_30309(String arg0, class_5462 arg1)
public static <K, V> SingleKeyCache<K, V>
a(Function<K, V> arg0)
singleKeyCache(Function<K, V> arg0)
method_48746(Function<K, V> arg0)
public static <T, R> Function<T, R>
b(Function<T, R> arg0)
memoize(Function<T, R> arg0)
method_34866(Function<T, R> arg0)
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)
public static <T> List<T>
a(Stream<T> arg0, baq arg1)
toShuffledList(Stream<T> arg0, RandomSource arg1)
method_43252(Stream<T> arg0, class_5819 arg1)
public static it.unimi.dsi.fastutil.ints.IntArrayList
a(IntStream arg0, baq arg1)
toShuffledList(IntStream arg0, RandomSource arg1)
method_43251(IntStream arg0, class_5819 arg1)
public static <T> List<T>
b(T[] arg0, baq arg1)
shuffledCopy(T[] arg0, RandomSource arg1)
method_43253(T[] arg0, class_5819 arg1)
public static <T> List<T>
a(it.unimi.dsi.fastutil.objects.ObjectArrayList<T> arg0, baq arg1)
shuffledCopy(it.unimi.dsi.fastutil.objects.ObjectArrayList<T> arg0, RandomSource arg1)
method_43027(it.unimi.dsi.fastutil.objects.ObjectArrayList<T> arg0, class_5819 arg1)
public static <T> void
c(List<T> arg0, baq arg1)
shuffle(List<T> arg0, RandomSource arg1)
method_43028(List<T> arg0, class_5819 arg1)
public static <T> CompletableFuture<T>
c(Function<Executor, CompletableFuture<T>> arg0)
blockUntilDone(Function<Executor, CompletableFuture<T>> arg0)
method_43499(Function<Executor, CompletableFuture<T>> arg0)
public static <T> T
a(Function<Executor, T> arg0, Predicate<T> arg1)
blockUntilDone(Function<Executor, T> arg0, Predicate<T> arg1)
method_43498(Function<Executor, T> arg0, Predicate<T> arg1)
public static <T> ToIntFunction<T>
g(List<T> arg0)
createIndexLookup(List<T> arg0)
method_43658(List<T> arg0)
public static <T> ToIntFunction<T>
h(List<T> arg0)
createIndexIdentityLookup(List<T> arg0)
method_53909(List<T> arg0)
public static <A, B> com.mojang.datafixers.Typed<B>
a(com.mojang.datafixers.Typed<A> arg0, com.mojang.datafixers.types.Type<B> arg1, UnaryOperator<com.mojang.serialization.Dynamic<?>> arg2)
writeAndReadTypedOrThrow(com.mojang.datafixers.Typed<A> arg0, com.mojang.datafixers.types.Type<B> arg1, UnaryOperator<com.mojang.serialization.Dynamic<?>> arg2)
method_54907(com.mojang.datafixers.Typed<A> arg0, com.mojang.datafixers.types.Type<B> arg1, UnaryOperator<com.mojang.serialization.Dynamic<?>> arg2)
public static <T> com.mojang.datafixers.Typed<T>
a(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1)
readTypedOrThrow(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1)
method_54908(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1)
public static <T> com.mojang.datafixers.Typed<T>
a(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1, boolean arg2)
readTypedOrThrow(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1, boolean arg2)
method_55333(com.mojang.datafixers.types.Type<T> arg0, com.mojang.serialization.Dynamic<?> arg1, boolean arg2)
public static <T> List<T>
a(List<T> arg0, T arg1)
copyAndAdd(List<T> arg0, T arg1)
method_57108(List<T> arg0, T arg1)
public static <T> List<T>
a(T arg0, List<T> arg1)
copyAndAdd(T arg0, List<T> arg1)
method_58272(T arg0, List<T> arg1)
public static <K, V> Map<K, V>
a(Map<K, V> arg0, K arg1, V arg2)
copyAndPut(Map<K, V> arg0, K arg1, V arg2)
method_57109(Map<K, V> arg0, K arg1, V arg2)