Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the 1.12.2 branch to Fabric through Ornithe #135

Open
wants to merge 2 commits into
base: liteloader_1.12.2
Choose a base branch
from

Conversation

SpaceWalkerRS
Copy link

With Liteloader no longer being maintained and the 1.14+ versions already on Fabric, it might be time to move the 1.12 version to Fabric too (and 1.13 later?). While Fabric doesn't natively support 1.12, they have shown to care about compatibility (what with Loader still being compiled on Java 8, for example). Ornithe provides intermediaries and mappings for versions Fabric doesn't natively support.

  • The build script is based off of that for the Fabric branches, with some tweaks to make it work for 1.12.2.
  • The mod.json is also based off of that for the Fabric branches.
  • An OSL dependency is added to fill the role FAPI takes in the Fabric versions (i.e. resource loading).
  • The only code changes are to replace references to Liteloader internals with calls to Fabric Loader.
  • MCP mappings are used to keeps the number of changes to a minimum. Loom has a migrateMappings task in case you'd like to migrate to Feather mappings.

@fooeyround
Copy link

This seems like it would help with version changes in the long run, if possible you could start using the same mappings..

Is the malilib rewrite about “done”? Or is there still major things you want to change (masa). Do you think this would be helpful? With this change most of the code could be reused between versions. I know you don’t like preprocessor magic. But this is the next best thing…
(You would still need to abstract out rendering stuff. But maybe not MinecraftClient)
Question for Space Walker: Does that liteloader mods on legacy fabric thing work on this? (You say it is Fabric Loader)

Overall I think this would be a cool change, but it does not matter what I think.
It may be a little bit of work to port over moss like tweakeroo, if loom does not fully auto remap… But if it does it would help. Plus you probably know the new mappings, or at least could use one throughout all of the mc versions. Given that these mappings are like yarn..

@SpaceWalkerRS
Copy link
Author

Question for Space Walker: Does that liteloader mods on legacy fabric thing work on this? (You say it is Fabric Loader)

It might, but the LiteFabric repo itself says it should not be used. It's a compatibility layer to make Litemods run on Fabric Loader, whereas this PR turns the mod into a Fabric mod directly.

It may be a little bit of work to port over moss like tweakeroo, if loom does not fully auto remap… But if it does it would help. Plus you probably know the new mappings, or at least could use one throughout all of the mc versions. Given that these mappings are like yarn..

Yeah it might be worth switching to Feather mappings considering how different MCP and Yarn are. Feather is ultimately forked from Yarn so many conventions are very similar. A lot of the abstraction code appears to use more Yarn-like names already.
I kept the project on MCP mappings for now to keep the PR smaller but it's relatively straightforward to switch with Loom's migrateMappings feature.

@zeichenreihe
Copy link

About LiteFabric:
The project was originally made by skyrising for just playing on SciCraft with masa's mods, using legacy-fabric. This was back in the days of fabric loader 0.13, and sky never updated to fabric loader 0.14. Fabric loader 0.14 broke skyrisings (very hacky, using Unsafe to set the parent class loader of KnotClassLoader) method to inject (remapped) litemods into minecraft.

As at some point SciCraft updated to 1.14 and then to newer versions, sky did not need this anymore.

I at some point wanted to use LiteFabric (I was the only one that found it and even to compile it). I got sky to push the last few commits he had, and I created a fork that attempts to fix the various problems the original LiteFabric had.

These changes include, but are not limited to:

  • I let it output .jar files (fully functional fabric mods, only depending on the LiteFabric mod itself) that contain the remapped mod mixins.
  • I removed the Unsafe class hackery, as I could just do the following instead: Get the user to launch minecraft again. On the first launch I detect that there are new .litemod files that are not remapped to normal mods, and if they exist I remap them and crash minecraft (right at the head of Main.main()). Then, if the game didn't start, the user can just press the "Launch Game" button again, and minecraft will open.

I still have to actually port my LiteFabric fork to Ornithe, and probably also give it a better name, this child deserves better. Then once I'm sure it works, and possibly after adopting loader plugins (looking at quit loader, might have some benefits), I will publish the mod.

I will probably also look into a broader version support, since playing 1.12.0 (I'm currently "playing" that version, server side, earths' connect-to-1-12-x for the win) has some smaller benefits over 1.12.2, like the ender pearl portal bug or item overstacking.

My current version of LiteFabric that I use (in production) is really just some random build I did some time ago, it works, but there's some hackery going on with mod icons (I suggested masa to include the icons from the mods at some specific path) as well as with the config menu (yes sky also did a modmenu port to legacy-fabric, I slightly modified that one as well), where you need to set the parent screen of the malilib config screen since masa's mods really just hijack the "open config button" from liteloader...

One should note that I also have a fork of skyrisings mixined-carpet branch of his carpetmod112 repo. I'm currently in the process (tho very slow moving ofc) of porting that to Ornithe as well, and I somewhat synced it to upstream carpet, so you have all your falling block commands as well. (You can then also use this carpet in single player, which is really nice)

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.

3 participants