Skip to content

fix(actinium): follow the GLState facade split - #17

Open
DHJComical wants to merge 2 commits into
Circulate233:mainfrom
DHJComical:fix/actinium-glsm-facade-compat
Open

DHJComical wants to merge 2 commits into
Circulate233:mainfrom
DHJComical:fix/actinium-glsm-facade-compat

Conversation

@DHJComical

Copy link
Copy Markdown

Actinium's public GLState API split (refactor(glsm): split GLStateManager into public state facades) moved two method bodies that this mod redirects into out of GLStateManager:

  • glBindVertexArray(I)V now lives in GLSMVertexInput;
  • flushDeferredVertexAttribs()V now lives in GLSMCurrentAttribs.

With the old targets the redirects scanned zero targets, and because they were declared with require = 1 the critical injection failure took GLStateManager down with it: NoClassDefFoundError: com/gtnewhorizons/angelica/glsm/GLStateManager.

What changed

  • The two existing mixins keep their targets and behaviour, so builds against the previous Actinium still apply them. Their injectors are relaxed from require = 1 to require = 0 so a target that moved is a skipped injector instead of a fatal one.
  • MixinGLSMVertexInputVertexArray and MixinGLSMCurrentAttribsGenericAttributes cover the new locations, keeping the same suppression logic (same-VAO bind skip, redundant COLOR / SECONDARY_UV upload skip). They resolve their target with @Mixin(targets = "..."), so an Actinium version without those classes only logs a warning.
  • Both are registered in novaeng_core.mixin.json.

Why this shape

Both Actinium builds have to keep working: the ones where the bodies are still in GLStateManager, and the ones with the facades. Duplicating the redirect per target with require = 0 gives full functionality on both, instead of losing the suppression on whichever version the mod was not built against.

Verification

  • NovaEngineering-Core-1.23.3 built, deployed to the NovaEngineering pack together with the facade build of Actinium, and the world loads without the injection failure that the previous build produced (Critical injection failure: Redirector nova$flushColor ... failed injection check (0/1)).
  • The remaining injectors (glVertexAttrib2f/2s/3f/4f, glDeleteVertexArrays, reset, preInit, init, markSplashComplete) still target GLStateManager, where those entry points remain present in both builds.

Actinium's public GLState API split moved two method bodies that this mod
redirects into out of GLStateManager: the vertex array bind now lives in
GLSMVertexInput and the deferred attribute flush in GLSMCurrentAttribs. With
the old targets the redirects scanned zero targets and the critical injection
failure took GLStateManager down with it.

Keep the existing mixins so builds against the previous Actinium still apply,
relax their injectors to require = 0, and add two mixins that resolve the new
facade classes by name, so a version without them only logs a warning.
Actinium moved the body of getBoundTextureForServerState() out of
GLStateManager into the public GLSMTextures facade, leaving a one line
delegate behind. The atlas upload binding redirect still pointed at the
GLStateManager body with require = 1, so every launch died in
InjectionError with "Scanned 0 target(s)" and took the whole
GLStateManager class down with a NoClassDefFoundError.

Keep the old redirect optional and add the facade counterpart, the same
way the deferred attrib suppression is handled. Both stay require = 0 so
either Actinium layout works.
@DHJComical

Copy link
Copy Markdown
Author

Added a second fix on top: MixinGLStateManagerUploadBinding still redirected RenderBackend.getInteger(I) inside GLStateManager.getBoundTextureForServerState()I with require = 1. Actinium moved that method body into GLSMTextures, so the redirect scanned zero targets and the resulting InjectionError took GLStateManager down with a NoClassDefFoundError during Display.create.

The old mixin is now require = 0 and MixinGLSMTexturesUploadBinding covers the facade layout, so both Actinium layouts work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant