Package-level declarations

Types

Link copied to clipboard
class Chronometer @JvmOverloads constructor(lastUpdate: Long = 0)
Link copied to clipboard
data class ClientProtocolVersion(val name: String, val version: Int) : Record
Link copied to clipboard
data class ColoredChar(val char: Char, val color: ChatFormatting) : Record
Link copied to clipboard

Just returns the value; expects the value to be already registered elsewhere.

Link copied to clipboard
class FloatValueProvider(val name: String, val default: Float, val range: ClosedFloatingPointRange<Float>, val suffix: String = "") : RangedValueProvider

ValueGroup.float registered to the submodule directly.

Link copied to clipboard
This should only be used in render thread!
Link copied to clipboard
class GitInfo
Link copied to clipboard
Link copied to clipboard
data class MessageMetadata(val prefix: Boolean = true, val id: String? = null, val remove: Boolean = true, val count: Int = 1) : Record

Stores some data used to construct messages. The id, when the message is sent from a client object, should follow the pattern ObjectName#UniqueString to avoid duplicates.

Link copied to clipboard
Link copied to clipboard

Does nothing; Has no value.

Link copied to clipboard
Link copied to clipboard
sealed interface RangedValueProvider

Provides a ranged value to a submodule. This has the advantage that the value can be either registered in the module or in the submodule.

Link copied to clipboard

Represents an operation that does not return a result and can only be executed once when canExecute returns true. This is protected, so all future calls won't execute the actual action.

Link copied to clipboard
Link copied to clipboard

Manages things like ModuleScaffold's silent mode. Not thread safe, please only use this on the main-thread of minecraft

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Both 1.20.3 and 1.20.4 use protocol 765, so we can use this as a default

Link copied to clipboard
val Window.dimensions: IntArray
Link copied to clipboard
val gpuDevice: GpuDevice
Link copied to clipboard
Link copied to clipboard
val interaction: MultiPlayerGameMode
Link copied to clipboard
Link copied to clipboard

Since 1.21.5 anything can be used to blocking

Link copied to clipboard

Since 1.21.6 the ServerboundPlayerCommandPacket.Action removed 2 entries for sneaking

Link copied to clipboard

Since 1.21.9 the byte format of net.minecraft.world.phys.Vec3 have been rewritten with net.minecraft.network.LpVec3.

Link copied to clipboard
Link copied to clipboard

Since 26.1 net.minecraft.network.protocol.game.ServerboundInteractPacket has only one mode with entity and relative position (previous INTERACT_AT).

Link copied to clipboard
val logger: Logger
Link copied to clipboard
val mc: Minecraft
Link copied to clipboard
val network: ClientPacketListener
Link copied to clipboard
val player: LocalPlayer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val world: ClientLevel

Functions

Link copied to clipboard
fun ChatComponent.addMessage(message: Component, id: String?, count: Int)

Adds a message and assigns the ID to it.

Link copied to clipboard
inline fun String.asPlainText(): Component

Returns an immutable Component from the receiver.

inline fun String.asPlainText(formatting: ChatFormatting): Component

Returns an immutable Component from the receiver with formatting.

inline fun String.asPlainText(style: Style): Component

Returns an immutable Component from the receiver with style.

Link copied to clipboard
inline fun Array<out Component>.asText(): Component
inline fun List<Component>.asText(): Component

inline fun String.asText(): MutableComponent

Returns a MutableComponent from the receiver. If you just need a Component, use asPlainText instead.

Link copied to clipboard
inline fun String.asTextContent(): ComponentContents
Link copied to clipboard
inline fun MutableComponent.bold(value: Boolean?): MutableComponent
Link copied to clipboard
fun browseUrl(url: String)

Open uri in browser

Link copied to clipboard
fun MutableComponent.bypassNameProtection(): MutableComponent
Link copied to clipboard
Link copied to clipboard
inline fun Double.ceilToInt(): Int
inline fun Float.ceilToInt(): Int
Link copied to clipboard
fun chat(text: String)
fun chat(text: String, command: Command)
fun chat(text: String, module: ClientModule)
fun chat(text: Component, command: Command)
fun chat(text: Component, module: ClientModule)
fun chat(text: Component, metadata: MessageMetadata = defaultMessageMetadata)

fun chat(vararg texts: Component, metadata: MessageMetadata = defaultMessageMetadata)

Adds a new chat message.

Link copied to clipboard
fun clickablePath(file: File): MutableComponent
Link copied to clipboard
fun LocalPlayer.clickBlockWithSlot(rayTraceResult: BlockHitResult, slot: Int, swingMode: SwingMode, switchMode: SwitchMode = SwitchMode.SILENT, sequenced: Boolean = true)
Link copied to clipboard
inline fun Char.colored(color: ChatFormatting): ColoredChar
Link copied to clipboard
fun MutableComponent.copyable(copyContent: String = this.string, hover: HoverEvent? = HoverEvent.ShowText( translation("liquidbounce.tooltip.clickToCopy") )): MutableComponent

Creates text with a copy-to-clipboard click event

Link copied to clipboard
Link copied to clipboard
fun env(name: String, property: String): String?

Get environment variable or system property.

Link copied to clipboard
inline fun Double.fastCos(): Float
inline fun Float.fastCos(): Float
Link copied to clipboard
inline fun Double.fastSin(): Float
inline fun Float.fastSin(): Float
Link copied to clipboard
inline fun Double.floorToInt(): Int
inline fun Float.floorToInt(): Int
Link copied to clipboard
Link copied to clipboard

Converts milliseconds to seconds, minutes, hours and days when present.

Link copied to clipboard
fun gradientText(text: String, startColor: Color4b, endColor: Color4b): MutableComponent

Creates text with a color gradient between two colors.

Link copied to clipboard
fun handlePacket(packet: Packet<*>): Result<Unit>
Link copied to clipboard
Link copied to clipboard
fun highlight(text: String): MutableComponent
fun highlight(text: MutableComponent): MutableComponent
Link copied to clipboard
inline fun MutableComponent.italic(value: Boolean?): MutableComponent
Link copied to clipboard
fun Collection<Component>.joinToText(separator: Component): Component

Joins a list of Component into a single Component with the given separator.

fun <T> Collection<T>.joinToText(separator: Component, prefix: Component? = null, postfix: Component? = null, transform: Function<T, Component>): Component
Link copied to clipboard
fun leetRandomly(rng: Random, str: String, leetReplacements: Int): String
Link copied to clipboard
fun markAsError(text: String): MutableComponent
fun markAsError(text: MutableComponent): MutableComponent
Link copied to clipboard
fun notification(title: String, message: Component, severity: NotificationEvent.Severity): NotificationEvent
fun notification(title: Component, message: String, severity: NotificationEvent.Severity): NotificationEvent
Link copied to clipboard
inline fun MutableComponent.obfuscated(value: Boolean?): MutableComponent
Link copied to clipboard
inline fun MutableComponent.onClick(event: ClickEvent?): MutableComponent
Link copied to clipboard
inline fun MutableComponent.onClickRun(callback: Runnable): MutableComponent
Link copied to clipboard
inline fun MutableComponent.onHover(event: HoverEvent?): MutableComponent
Link copied to clipboard
fun Minecraft.openChat(text: String, draft: Boolean = false)

Open a ChatScreen with given text, or set the text of current ChatScreen

Link copied to clipboard
Link copied to clipboard
inline operator fun Style.plus(color: Color4b): Style
inline operator fun Style.plus(formatting: ChatFormatting): Style
inline operator fun Style.plus(clickEvent: ClickEvent): Style
inline operator fun Style.plus(hoverEvent: HoverEvent): Style
inline operator fun Style.plus(color: TextColor): Style
Link copied to clipboard
inline operator fun MutableComponent.plusAssign(other: String)
inline operator fun MutableComponent.plusAssign(other: Component)
Link copied to clipboard
fun randomUsername(maxLength: Int = Random.nextInt(8, 17), rng: Random = Random.Default): String

Generates 16 char long names in this format: (x = random separator character (0-9_))

Link copied to clipboard
fun regular(text: String): MutableComponent
fun regular(text: MutableComponent): MutableComponent
Link copied to clipboard
fun MultiPlayerGameMode.releaseUsingItemInTickLoop()
Link copied to clipboard
fun ChatComponent.removeMessage(id: String?)

Removes all messages with the given ID.

Link copied to clipboard
Link copied to clipboard

Returns the root domain of the domain.

Link copied to clipboard
fun Double.roundToDecimalPlaces(decimalPlaces: Int = 1): Double

Rounds the given number to the specified decimal place (the first by default). For additional info see RoundingMode#HALF_UP.

fun Float.roundToDecimalPlaces(decimalPlaces: Int = 1): Float
Link copied to clipboard
fun selectProtocolVersion(protocolId: Int)
Link copied to clipboard
fun ClientCommonPacketListenerImpl.send1_11_1OpenInventory()

Sends an open inventory packet with the help of ViaFabricPlus. This is only for older versions. (<= 1.11.2)

Link copied to clipboard
fun ClientCommonPacketListenerImpl.send1_21_5StartSneaking()
Link copied to clipboard
fun ClientCommonPacketListenerImpl.send1_21_5StopSneaking()
Link copied to clipboard
fun send1_8PlayerInput(sideways: Float, forward: Float, jumping: Boolean, sneaking: Boolean)
Link copied to clipboard
fun send1_8SignUpdate(blockPos: BlockPos, lines: Array<String>)
Link copied to clipboard
fun ClientPacketListener.sendChatOrCommand(message: String)
Link copied to clipboard
fun ClientCommonPacketListenerImpl.sendCloseInventory()
Link copied to clipboard
fun ClientCommonPacketListenerImpl.sendHeldItemChange(slot: Int)
Link copied to clipboard
fun sendPacketSilently(packet: Packet<*>)
Link copied to clipboard
fun ClientCommonPacketListenerImpl.sendStartSprinting()
Link copied to clipboard
fun ClientCommonPacketListenerImpl.sendStopSprinting()
Link copied to clipboard
fun ClientCommonPacketListenerImpl.sendSwapItemWithOffhand()
Link copied to clipboard
inline fun MutableComponent.strikethrough(value: Boolean?): MutableComponent
Link copied to clipboard
Link copied to clipboard
fun textLoadingBar(percent: Int, progress: ColoredChar = '█'.colored(ChatFormatting.WHITE), remaining: ColoredChar = '░'.colored(ChatFormatting.DARK_GRAY), length: Int = 10): Component

Generates a progress bar based on the percentage (range 0 to 100).

Link copied to clipboard
inline fun textOf(vararg parts: Component): Component
Link copied to clipboard
inline fun Double.toDegrees(): Double
inline fun Float.toDegrees(): Float
Link copied to clipboard
Link copied to clipboard
fun Identifier.toName(): String

Converts an Identifier to a human-readable name without localization.

Link copied to clipboard
inline fun Double.toRadians(): Double
inline fun Float.toRadians(): Float
Link copied to clipboard
fun FormattedCharSequence.toText(): Component
Link copied to clipboard
fun TranslatableContents.toTranslatedString(): String
Link copied to clipboard

Translate alt color codes to minecraft color codes

Link copied to clipboard
fun Component.translated(): Component
fun ComponentContents.translated(): ComponentContents
Link copied to clipboard
inline fun MutableComponent.underline(value: Boolean?): MutableComponent
Link copied to clipboard
fun MultiPlayerGameMode.useItem(player: Player, hand: InteractionHand, yRot: Float, xRot: Float): InteractionResult

MultiPlayerGameMode.useItem but with custom rotations.

Link copied to clipboard
fun variable(text: String): MutableComponent
fun variable(text: MutableComponent): MutableComponent
Link copied to clipboard
infix inline fun Float.vector2f(other: Float): Vector2f
Link copied to clipboard
fun warning(text: String): MutableComponent
fun warning(text: MutableComponent): MutableComponent
Link copied to clipboard
fun Services.with(sessionService: MinecraftSessionService = this.sessionService, servicesKeySet: ServicesKeySet = this.servicesKeySet, profileRepository: GameProfileRepository = this.profileRepository, nameToIdCache: UserNameToIdResolver = this.nameToIdCache, profileResolver: ProfileResolver = this.profileResolver): Services
Link copied to clipboard
inline fun MutableComponent.withColor(value: ChatFormatting?): MutableComponent
inline fun MutableComponent.withColor(value: TextColor?): MutableComponent