Documentation

Learn how to install and use LiquidBounce with our comprehensive guides

Stable API

Add-ons compile against the whole client, there is no separate API artifact. What an add-on can rely on between builds is everything marked @AddonApi: a marked class with its public members, or a single marked function or property. The rest of the client is public as well, but may change in any build.

What stable means

The marked declarations are recorded in api/LiquidBounce.api in the LiquidBounce repository, and the client's build compares its code against that file. A marked declaration therefore cannot change or disappear by accident. When it changes on purpose, the file changes with it, visible in the commit.

Stable does not cover Minecraft. An add-on is built for one Minecraft version and is rebuilt for the next, see Publishing.

If an add-on needs something that is not marked, ask for it on GitHub instead of copying it.

What is marked

AreaDeclarations
Add-onLiquidBounceAddon, AddonMetadata, AddonState
ModulesClientModule, ModuleCategory, ModuleCategories, ModuleManager.get, ModuleClickGui, MinecraftShortcuts
SettingsValueGroup with every builder, ToggleableValueGroup, Value, Config, ChoiceListValue.getChoicesStrings, ModeValueGroup.getModeStrings
EventsEvent, CancellableEvent, EventState, EventListener with on, onTick, after and every, EventManager, the events in the Events table, EventPriorityConvention
CommandsCommandRegistrar, ClientCommandSource, CommandManager.execute, CommandManager.isRootTaken, CommandManager.GlobalSettings
HUDHudComponent, NativeHudComponent, HudComponentFactory.NativeHudComponentFactory, HudComponentManager, HudComponentTweak, Alignment
RenderingWorldRenderEnvironment, renderEnvironment, withPositionRelativeToCamera, drawBox, drawLine, FULL_BOX, drawQuad, FontManager, AbstractFontRenderer, HorizontalAnchor, VerticalAnchor, Color4b
BrowserBrowserBackend, BrowserBackendProvider, BrowserBackendManager.registerBackend, Browser, BrowserTexture, BrowserViewport, BrowserState, BrowserSettings, BrowserAccelerationFlags, InputAcceptor, InputHandler
Chatchat, notification, regular, variable, highlight, warning, markAsError, MessageMetadata, translation
CombatattackEntity, findEnemy, findEnemies, shouldBeAttacked, shouldBeShown, CombatManager, EntityTargetingInfo, EntityTargetClassification, FriendManager.add, remove and clear
RotationsRotationManager.setRotationTarget, currentRotation, serverRotation, RotationTarget, RotationsValueGroup, Rotation, MovementCorrection, Priority
WorldBlockPos.state, stateOrEmpty, getBlock, outlineBox, BlockState.isInteractable, doPlacement, doBreak, SwingMode
InventorySlots, ItemSlot, HotbarItemSlot, SilentHotbar, useHotbarSlotOrOffhand, InventoryManager.isInventoryOpen, isHandledScreenOpen
MovementDirectionalInput, LocalPlayer.moving, Entity.horizontalSpeed, Vec3.withStrafe, LocalPlayer.stopXZVelocity, Timer.requestTimerSpeed
MiscsendPacketSilently, inGame, Chronometer, InputBind, MarketplaceItemType, MarketplaceItemHandler, MarketplaceManager handlers, SubscribedItem

The API file is the complete list.

What is not marked

Some of what the template and these pages use is public but not marked:

  • the handler functions handler, tickHandler, sequenceHandler and the waits waitTicks, tickUntil, waitMatches. on, onTick, after and every are their stable counterparts.
  • the command DSL (register, literal, argument, optional, exec, suggestions). Plain Brigadier builders are the stable counterpart.
  • Mode and most of ModeValueGroup.
  • built-in modules, and everything else not in the list.

A change to them is not caught by the client's build.

Changing the API

For contributors to LiquidBounce: mark a declaration with @AddonApi to make it stable, then record it:

./gradlew updateKotlinAbi

Commit the updated api/LiquidBounce.api together with the change. ./gradlew checkKotlinAbi fails while the code and the file disagree, so a change to a marked declaration always shows up in review. Marked declarations look unused from inside the client, remove them only on purpose.