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

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
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

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
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

Global minecraft timer

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

1.21.4 client + 1.8 server can block with sword, but the net.minecraft.world.item.ItemStack has no net.minecraft.core.component.DataComponents.BLOCKS_ATTACKS

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

Offhand cannot be used as a SWAP target in any container on 1.15.2 and below.

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 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
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 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
fun env(name: String, property: String): String?

Get environment variable or system property.

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 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 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, closeOnSubmit: Boolean = true)

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

Link copied to clipboard
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 ChatComponent.removeMessage(id: String?)

Removes all messages with the given ID.

Link copied to clipboard
fun selectProtocolVersion(protocolId: Int)
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
inline fun MutableComponent.strikethrough(value: Boolean?): MutableComponent
Link copied to clipboard
fun Identifier.toName(): String

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

Link copied to clipboard
inline fun MutableComponent.underline(value: Boolean?): MutableComponent
Link copied to clipboard
fun variable(text: String): MutableComponent
fun variable(text: MutableComponent): MutableComponent
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