Package-level declarations

Utilities related to the Kotlin language itself

Types

Link copied to clipboard
class LimitedAccessWrapper<T>(value: T)

Protects access to the given value by wrapping it in this class and only exposing it via the access function, which will only be executed in a context where the internal Mutex is locked.

Link copied to clipboard

Properties

Link copied to clipboard
val <T : Comparable<T>> Pair<T, T>.max: T
Link copied to clipboard
val <T : Comparable<T>> Pair<T, T>.min: T
Link copied to clipboard

Returns a kotlin.time.Duration for the time the given amount of ticks would take in an ideal scenario.

Functions

Link copied to clipboard
fun RandomSource.asKotlinRandom(): Random

Returns a Kotlin Random wrapping this RandomSource. This gives you access to the much more polished Kotlin random API.

Link copied to clipboard
fun Random.asMinecraftRandom(): RandomSource

Returns a Minecraft RandomSource wrapped this Kotlin Random.