Skip to content

Incompatibility with other NeoForge UI mods (Unshaded imgui-java library in Veil) #502

@AlexAll03

Description

@AlexAll03

Context

Describe the bug

I have encountered a severe Classpath Conflict regarding how Sable (via Veil) handles the imgui-java dependency.

Currently, Veil embeds the native imgui-java jars (version 1.88) via Jar-in-Jar without shading/relocating them (e.g., using the Shadow plugin to relocate them to foundry.veil.libs.imgui.*). Because the library is left in the global imgui.* namespace, it creates a hard incompatibility with any other native NeoForge mod that utilizes a different version of the ImGui library for its UI.

When both mods load, the JVM only keeps one version of imgui.ImFontAtlas in the classpath. This results in an immediate crash when the other mod attempts to call a method that doesn't exist in Veil's bundled version (or vice versa).
The specific missing method in this case is: java.lang.NoSuchMethodError: 'void imgui.ImFontAtlas.setTexID(int)'.

How to reproduce natively (Without Connector)

  1. Install Sable alongside any native NeoForge mod that initializes a different version of imgui-java in its client setup.
  2. Launch the game.
  3. The game will crash during the entrypoint or client initialization phase due to library collision.

Proposed Solution

Please consider shading/relocating the imgui-java dependency within Veil's build.gradle so it is completely isolated from the rest of the NeoForge modding environment. This would instantly fix compatibility with a wide range of UI and Debug mods. Thank you for your work on this amazing physics engine!

Crash Report Note

The attached crash log is from an environment testing cross-platform compatibility (which triggered the issue immediately). However, the root cause is the unshaded imgui-java library, which affects pure NeoForge environments just the same.

Crash Report

https://mclo.gs/o57zgu5

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: crashSomething crashes my game

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions