Client Command Source
Lightweight command source for LiquidBounce client commands, mirroring the role of Minecraft's CommandSourceStack on the server side.
The client only executes commands in the local game context, so the source is a singleton that exposes the current game state. requires predicates and handlers can use playerOrNull/levelOrNull/isIngame to gate execution, while the inherited MinecraftShortcuts properties stay non-null for use after the ingame check passed.
Implements vanilla SharedSuggestionProvider (like the client's own ClientSuggestionProvider) so argument types such as Vec3ArgumentType, ResourceArgument and ItemArgument resolve their suggestions through the source, instead of each provider hardcoding its candidates. Every delegate falls back to an empty/static value when no server connection exists (main menu, unit tests).
Properties
Functions
Server-driven custom tab completions require a request/response round-trip with a pending-suggestions id owned by the vanilla ClientSuggestionProvider; our client commands never reach the server, so there is nothing to query - empty by design.
Feature flags announced by the current server connection; the vanilla defaults when no server is joined (main menu, unit tests).
Synced world registries when a level is loaded; otherwise the static builtin RegistryAccess (not VanillaRegistries.createLookup, which is only a HolderLookup.Provider and is not a RegistryAccess).
Registry element suggestions for argument types such as ResourceArgument.