Util

class Util(source)

The must-have Utilities class for miscellaneous functions.

Functions

Link copied to clipboard
open fun checkModVersion(@NotNull modId: @NotNull String, @NotNull predicate: @NotNull (Version) -> Boolean): Boolean
Checks if the appropriate version if the given mod is loaded.
Link copied to clipboard
@NotNull
open fun <T> getEntrypointContainers(@NotNull type: @NotNull Class<@NotNull T>): @NotNull List<EntrypointContainer<@NotNull T>>
Gets all entry point containers from fabric.mod.json with name specified in the EntrypointName annotation of the given type.
Link copied to clipboard
@Nullable
open fun getEntrypointName(@NotNull type: @NotNull Class<out Any>): @Nullable String
Gets the entry point name of the given type from its EntrypointName annotation.
Link copied to clipboard
@NotNull
open fun <T> getEntrypoints(@NotNull type: @NotNull Class<@NotNull T>): @NotNull List<@NotNull T>
Gets all entry points from fabric.mod.json with name specified in the EntrypointName annotation of the given type.
Link copied to clipboard
@Nullable
open fun getStackTraceElementAt(depth: Int): @Nullable StackTraceElement
Gets the StackTraceElement at depth stack frames deep.