Dark

hello! I would like to create a utility mod for 26.2 it will be used in single player only.

The client is made fully in c++, with the menu being imgui and injection handled by minhook. Any modules are implemented via JNI with a consistent logic that will not break.

DO NOT assume this is going to be updated. If i say a specific version like fabric 26.2 you do not need to care if it breaks on next update, we are not going to be updating.

Kodari AI
KodariSep 20 at 11:35 am 2
JNIModFramework
A single-player utility mod for Minecraft Fabric 26.2 built in C++ with ImGui menus and MinHook injection. Modules are implemented via JNI with a consistent, stable logic layer that will not break. The framework provides a clean separation between native C++ core functionality and Java-based module definitions, enabling rapid development of custom utilities without modifying core injection logic. Designed exclusively for single-player use with no update maintenance required.
  1. Create the Fabric 26.2 client-only mod scaffold and JNI bridge.

  2. Add the native C++/CMake layer with ImGui/MinHook integration points and single-player gating.

  3. Add the required Gradle, Fabric metadata, and native build configuration.

  1. Created the Fabric 26.2 client-only mod scaffold with Java 25, Fabric Loader 0.19.3, and Fabric API 0.158.0.

  2. Added JNI bridge code that initializes the native layer and forwards client ticks with single-player detection.

  3. Added native C++ infrastructure using CMake, ImGui, and MinHook.

  4. Added an OpenGL SwapBuffers hook for rendering the ImGui overlay.

  5. Added a module manager with single-player-only rendering behavior.

Native dependencies are fetched automatically by CMake from ImGui and MinHook repositories.

Dark

make some feature like these

1 image attached
Kodari AI
KodariSep 20 at 12:29 pm 3
  1. Inspect the current client/native architecture and existing module hooks.

  2. Add a first utility set matching the menu style: toggleable HUD, coordinates/FPS display, sprint toggle, and click-GUI state handling.

  3. Keep the implementation single-player-only and leave combat automation out of the initial pass so the framework remains stable.

The existing bridge only forwards a single-player boolean, so the utility modules need a small client snapshot rather than trying to read Minecraft state from native code. I’ll add that snapshot, plus four safe single-player utilities: HUD status, coordinates, FPS, and a sprint toggle controlled from the ImGui menu.

The first pass is in place. I’m tightening the tick/render handoff now so the ImGui render thread and Java client-tick thread do not race over utility state.Added a first utility feature set matching the reference menu style:

  • Coordinates display — shows player X/Y/Z.

  • FPS display — reads Minecraft’s native FPS counter.

  • Sprint lock — keeps the local player sprinting while enabled.

  • Single-player-only behavior — utilities and rendering are disabled outside single-player.

  • Thread-safe state handling — synchronized client snapshots and atomic sprint/menu state.

  • Expanded JNI bridge — forwards player position, FPS, player presence, and sprint state from Java to native C++.

Updated:

  • KodariUtilityClient.java

  • NativeBridge.java

  • module.hpp

  • module_manager.hpp

  • module_manager.cpp

  • native_bridge.cpp

  • minhook_manager.cpp

The options are currently exposed inside the existing Kodari ImGui window.

Kodari can make mistakes. Review important code before using.
Files
native
src
build.gradle
gradle.properties
settings.gradle
Code
15 654
src/client/java/com/kodari/utility/KodariUtilityClient.java
package com.kodari.utility;

import com.kodari.utility.nativebridge.NativeBridge;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraft.client.Minecraft;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class KodariUtilityClient implements ClientModInitializer {
    public static final String MOD_ID = "kodariutility";
    private static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitializeClient() {
        if (!NativeBridge.initialize()) {
            LOGGER.error("The Kodari native client could not be initialized");
            return;
        }

        ClientTickEvents.END_CLIENT_TICK.register(KodariUtilityClient::onClientTick);
        LOGGER.info("Kodari native client initialized");
    }

    private static void onClientTick(Minecraft client) {
        boolean singleplayer = client.hasSingleplayerServer();
        if (client.player == null) {
            NativeBridge.clientTick(singleplayer, 0.0, 0.0, 0.0, client.getFps(), false, false);
            return;
        }

        NativeBridge.clientTick(
                singleplayer,
                client.player.getX(),
                client.player.getY(),
                client.player.getZ(),
                client.getFps(),
                true,
                client.player.isSprinting()
        );

        if (singleplayer && NativeBridge.sprintLockEnabled()) {
            client.player.setSprinting(true);
        }
    }
}