Skip to content

[WIP] 26.1+ Support and Bug Fixes#185

Draft
hypherionmc wants to merge 3 commits intounimined:lts/1.4from
firstdarkdev:1.4-obfuscation
Draft

[WIP] 26.1+ Support and Bug Fixes#185
hypherionmc wants to merge 3 commits intounimined:lts/1.4from
firstdarkdev:1.4-obfuscation

Conversation

@hypherionmc
Copy link
Contributor

@hypherionmc hypherionmc commented Jan 8, 2026

This PR includes more fixes and support for 26.1+.

I'll make a detailed list of changes below and add a TODO to keep track of progress. I'm keeping this PR as a draft as more things could possibly break, or more bugs could be discovered

TODO:

  • Add Test for 26.1 (we can do this on snapshots already with both neo and fabric)
  • Test/Fix Forge when available
  • AccessWideners cannot apply in runtime, because it uses 'named' and the game expects official. Have done a fix for this as well, but needs more testing
  • ?

Changes

  • NeoForge changed their NeoForm (MCP) scheme and layout, which completely caused neoforge setups to fail. I've adjusted MCP config to support both the new and old version and adjusted any processing code that needed it.
  • Fabric was still in some rare cases trying to pull in intermediary, even with no mappings supplied.
  • NeoForge was still trying to pull in Mojmap, even when no mappings were supplied

@hypherionmc hypherionmc marked this pull request as draft January 8, 2026 18:05
@gniftygnome
Copy link

If you're making a complete list of things still needed, there are changes needed in MappingsLibrary to fully support Class Tweaker access wideners and interface injection for Fabric and Fabric common. See #170. Right now in my testing everything seems to work fine but in the end the AWs and IIs just don't get applied after refreshing gradle and running genSources.

@hypherionmc
Copy link
Contributor Author

If you're making a complete list of things still needed, there are changes needed in MappingsLibrary to fully support Class Tweaker access wideners and interface injection for Fabric and Fabric common. See #170. Right now in my testing everything seems to work fine but in the end the AWs and IIs just don't get applied after refreshing gradle and running genSources.

I also noticed that Classtweakers themselves don't work, due to UML not supporting it. I have taken a rough look to try and figure out what needs to change.

I don't personally use Injections, so I wouldn't know how to test against them. If someone is willing to supply a sample repo I can use for testing that would be great

@gniftygnome
Copy link

I also noticed that Classtweakers themselves don't work, due to UML not supporting it.

FWIW at the moment Loom still uses accessWidener to configure the Class Tweaker file. I've been assuming Unimined is following the same convention. No complaints are issued when the latest Unimined 1.4 snapshot is configured in this manner.

If someone is willing to supply a sample repo I can use for testing that would be great

I've uploaded my current progress on Biolith here: https://github.com/TerraformersMC/Biolith/tree/26.1-unimined
Right now the build is clearly blocked by the missing AW and II. However, I don't know if fixing those will give a clean build or not. There may be something else I need to fix once the AW and II are working. A good file to look at to see if AW and II are working is common/src/main/java/com/terraformersmc/biolith/impl/commands/BiolithDescribeCommand.java. F.e. Climate.RTree should be access widened and biomeSource.biolith$getBiomeEntries() should be resolved via interface injection.

@thecatcore
Copy link
Contributor

Currently the old way of implementing II through fabric.mod.json should still work.

@gniftygnome
Copy link

gniftygnome commented Jan 11, 2026

Currently the old way of implementing II through fabric.mod.json should still work.

I'm hoping to avoid that because it forces me to jump through some stupid hoops (defining a fake fabric.mod.json in the common project, then creating another source set which excludes it and reconfiguring all the other projects to use the special source set so they don't try to package the fake FMJ). This is actually an area where switching to Class Tweaker is a big part of why I decided I might finally be able to use Unimined.

@gniftygnome
Copy link

gniftygnome commented Jan 11, 2026

Currently the old way of implementing II through fabric.mod.json should still work.

This didn't seem right to me (but I wasn't sure about my memory). I backed out all the changes, to use the (extra source set) AW and II configuration I had working in 1.21.11 when I switched to Unimined there as a stepping stone to the 26.1 upgrade. Neither the AW nor the II apply when using the latest 1.4.2 snapshot (1.4.2-303de6a-SNAPSHOT), even with the build files that worked in 1.21.11. But I have to use the snapshots to have working unobf builds. So I think this statement is incorrect.

@hypherionmc
Copy link
Contributor Author

hypherionmc commented Jan 12, 2026

Neither the AW nor the II apply when using the latest 1.4.2 snapshot

This is actually a bug in my implementation. The fix for it will be part of this PR. The reason it happens is because of a mapping namespace indifference internally, and then the AW is just ignored.

I do need to fix it though, otherwise the game crashes when you try to load an AW

@dima-dencep
Copy link
Contributor

Any progress?

@hypherionmc
Copy link
Contributor Author

No progress as of yet. There are a few more things we picked up as snapshots went along which still need to be addressed.

I haven't been spending much time on modding lately because of life. I need to look at the additional things that are still broken and PR those in so we atleast have a somewhat working environment to continue from. Once that's done I'll mark this PR for review so people can at least continue testing and we can fix new issues that pop up after that.

I do think LexForge will still be completely broken, but since they have no snapshots, there is no way to test that yet....

if (!legacyATFormat) {
val lines = temp.bufferedReader().readLines()
temp.bufferedWriter().use {
writer -> lines.filter { s -> !s.startsWith(" ") }.forEach { writer.write(it) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you need to add \n (new line) without this, AT is generated as continuous text:

Image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like

if (!legacyATFormat) {
    val lines = temp.bufferedReader().readLines()
    temp.bufferedWriter().use { writer ->
        lines.filter { s -> !s.startsWith(" ") }.forEach {
            writer.write(it)
            writer.newLine()
        }
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, weird. Didn't see that happen in the IDE where I tested it. Probably had something autoformatting it

@gniftygnome
Copy link

I merged this PR as-is into unimined:lts/1.4 and this appears to resolve all of the issues I was having attempting to build via Unimined. Access wideners and interface injections are both applying via Class Tweaker. So now I am pondering whether to put this up on my personal maven so I can get official Biolith builds going for 26.1...

  • I have tested with only Fabric active. I still need to test NeoForge, and nobody can test Forge ;)
  • I have an odd problem where translations are not getting applied in dev. They do apply in prod.
  • For some reason the project builds a top-level jar, which is not useful. Still working out how to disable that.

@gniftygnome
Copy link

Neoforge seems to mostly work but I can't get the access transformer to apply. It claims it's applying it, but access isn't transformed.

@dima-dencep
Copy link
Contributor

AT really doesn't work on Neoforge; I posted a fix in the comments above. If you need a working version of Unimined, use https://repo.redlance.org/#/public/xyz/wagyourtail/unimined/xyz.wagyourtail.unimined.gradle.plugin/1.4.2+redlance.2

@hypherionmc
Copy link
Contributor Author

I have applied that fix, but still have to push it. Just not getting around to testing 😅🫩

@gniftygnome
Copy link

AT really doesn't work on Neoforge; I posted a fix in the comments above. If you need a working version of Unimined, use https://repo.redlance.org/#/public/xyz/wagyourtail/unimined/xyz.wagyourtail.unimined.gradle.plugin/1.4.2+redlance.2

Do you mean #185 (comment) ? I applied that and re-ran genSources, but it doesn't appear to have made any difference. The generated AT file did have newlines, both before and after.

@dima-dencep
Copy link
Contributor

Do you mean #185 (comment) ? I applied that and re-ran genSources, but it doesn't appear to have made any difference. The generated AT file did have newlines, both before and after.

Yeah, all my changes are available at https://github.com/dima-dencep/Unimined
You might want to delete the .gradle folder in your user directory, or something

@hypherionmc
Copy link
Contributor Author

I did notice some random cache issues (which I cannot accurately replicate, therefore cannot test) with Unimined 1.4, where it will keep outdated or corrupt stuff in the cache. I've had to delete my unimined folders (both in gradle home and my project) multiple times across different MC versions to fix stuff like invalid de-obfed files, mixins being broken etc.

@dima-dencep
Copy link
Contributor

yea, same 🫩

@gniftygnome
Copy link

gniftygnome commented Mar 16, 2026

Yesss... I had deleted all caches in the project, but I did that again and also deleted unimined from my user cache and that did it. So it's probably something in the user cache not the project cache.

@hypherionmc
Copy link
Contributor Author

That about sums up what I noticed too. So definitely some weird issue in the cache system 😫

@gniftygnome
Copy link

gniftygnome commented Mar 16, 2026

New request! Could there be a ct2at (or could aw2at handle that case)?

edit: I know that won't get me II in the forges ... I will miss that feature of arch loom, but I can work around it.

@dima-dencep
Copy link
Contributor

ct2at is certainly possible, but first we need to wait for support for the classtweaker format at https://github.com/unimined/UniminedMappingLibrary

@dima-dencep
Copy link
Contributor

unimined/UniminedMappingLibrary#3

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.

4 participants