Tags
Creators
Details
mc26-1.2.0
Compatibility
Changes
Added
Server-driven mouse capture (Fabric client + Fabric/Paper server reference)
- New custom payload / plugin message channels:
krepapi:s2c_mouse_capture— enable or configure capture (enabled,flags,consumeVanilla).krepapi:c2s_mouse_action— client reports button presses/releases, scroll deltas, and optionally normalized cursor position on each forwarded event.
- Flags (combine with bitwise OR): mouse buttons (left/right/middle via GLFW button id), scroll wheel, optional cursor on events (cursor as 0–1 in scaled window coordinates).
- Capability
SERVER_MOUSE_CAPTUREinc2s_client_info. Reference implementations only sends2c_mouse_captureif the client advertised this bit, so older KrepAPI clients without mouse support are not sent an unregistered payload. - Wire format is defined in
ProtocolMessages(same bytes on Fabric custom play payloads and PapersendPluginMessage);c2s_mouse_actionis self-describing so Paper can decode without remembering prior S2C state. - Client:
MouseCaptureState,MouseMixinonMouseHandler(onButtonwithMouseButtonInfo,onScroll), same eligibility gate as raw keyboard capture (in play, network handler present, player or screen open). - Server: Fabric —
KrepapiFabricServerNetworking.registerMouseActionListener,sendMouseCaptureConfig,getClientCapabilities; handshake entry stores the client capability bitmask after a successfulc2s_client_info. Paper — outgoing/incoming channel registration,KrepapiPaperPlugin.sendMouseCaptureConfig,getClientCapabilities, session capability map, debug logging for mouse actions.
Build version requirement expressions (legacy / ranges)
KrepapiVersionRequirementparsesminimum-mod-version/ FabricminimumModVersion/ plugin registrations: bareX.Y.Zremains>=(compatible); alsoX.Y.Z>,=X.Y.Z,<X.Y.Z,X.Y.x/X.Y.*, two-partX.Yfor a minor line; middle wildcards (1.x.2) are rejected.KrepapiVersionPolicyevaluates the intersection of all requirements;KrepapiKickReasons.forVersionCheckFailureformats kicks.s2c_hello.minModVersionis a summary (max floor if all are minima, else joined specs).- Paper: invalid
minimum-mod-versiondisables the plugin on enable; invalid combined requirements kick on join with a misconfiguration message. Fabric: logs invalid default settings at register; per-join validation with the same kick text.
Minecraft 26.1 Fabric build (:fabric-26-1)
- Second Fabric artifact from the same repo:
KrepAPI-mc26.1(mod id stillkrepapi), targeting 26.1–26.1.1, Loader 0.18.6, Fabric API 0.144.3+26.1,net.fabricmc.fabric-loom1.15-SNAPSHOT (unobfuscated game; noremapJar), Java 25 toolchain. - Source tree is a fork of the 1.21 module with 26.1-specific wiring:
PayloadTypeRegistry.clientboundPlay/serverboundPlay,KeyMappingHelper.registerKeyMapping(fabric-key-mapping-api-v1).
Fixed
overrideVanilla server bindings vs. player keybinds
- Vanilla blocking for
overrideVanillapreviously compared each key event only to thedefaultKeyfroms2c_bindings. After rebinding in Minecraft’s controls, the wrong key (or no key) could still be consumed or missed. - The client now keeps a list of
actionIds withoverrideVanillaand, on every key event, resolves the currentKeyMappingand usesKeyMapping.matches(KeyEvent)so suppression follows the live binding (KrepapiKeyPipeline). ServerBindingManager.applyBindingsregisters all serverKeyMappings before applying the override list, so lookups are always valid when the list is installed.
Changed
- Two-part requirement strings: A value with exactly two numeric segments (e.g.
1.2) is now a minor line (1.2.x), not a shorthand for>= 1.2.0. Use1.2.0or1.2.0>for a minimum floor.
Gradle layout
- Fabric mod for 1.21.4–1.21.11 lives in
fabric-1-21→KrepAPI-mc1.21JAR (remapped Loom as before). Root project is an aggregator; rungradlew buildto produce both Fabric JARs plusprotocolandpaper-plugin. - Gradle Wrapper updated to 9.4.0 (recommended for Loom 1.15 / 26.1).
Build targets (this repository)
- Fabric
fabric-1-21(KrepAPI-mc1.21): Minecraft 1.21.11, Fabric Loader 0.18.2, Fabric API 0.139.4+1.21.11,net.fabricmc.fabric-loom-remap1.14-SNAPSHOT, official Mojang mappings (loom.officialMojangMappings()), Java 21.fabric.mod.jsonrange>=1.21.4 <=1.21.11. - Networking (Fabric 1.21): play payloads use
CustomPacketPayload,CustomPacketPayload.Type, andStreamCodeconRegistryFriendlyByteBuf(Mojang names; not YarnCustomPayload/PacketCodec/RegistryByteBuf). - Paper reference plugin:
paper-api1.21.11-R0.1-SNAPSHOT,plugin.ymlapi-version: '1.21.11', default minimum mod build tracks the mod (seegradle.propertiesmod_version). - Server-driven keys on 1.21.x use
KeyBindingHelper.registerKeyBinding(net.fabricmc.fabric.api.client.keybinding.v1).
Documentation
docs/protocol.md— wire format, channels, build requirement expressions, kick reasons,minModVersionsummary semantics.docs/client-api.md— mouse capture, intercept keys, handshake fields, Fabric server settings,fabric.mod.jsondepends, version API examples.docs/paper-plugin.md— config examples,versionGate, capabilities /sendMouseCaptureConfig, Gradle note.
Supplementary resources
| File | Type | Size | |
|---|---|---|---|
| KrepAPI-mc26.1-1.2.0-sources.jar | Sources jar | 25.62 KiB |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:uRt7iUC0:P3B4al6g"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:uRt7iUC0:P3B4al6g"
}

