CaffeineMC / sodium-fabric

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.72k stars 807 forks source link

Inconsistent structure between fabric and forge subprojects, mixin rules don't apply to platform specific code #2688

Open mrmangohands opened 1 month ago

mrmangohands commented 1 month ago

Bug Description

Currently fabric specific mixins are located under the sodium.mixin.fabric package while neoforge ones are under sodium.neoforge.mixin. Neither of these layouts let mixin rules from common apply to mixins in the subprojects. Either the mixin rule system would need to be updated to apply automatically to matching subpackages in the subprojects, or both could just use sodium.mixin as the base, with a neoforge, fabric, or generically platform bottom level subpackage. So for example instead of sodium.mixin.fabric.core.WindowMixin you could have sodium.mixin.core.fabric.WindowMixin.

We should decide which of the 3 layouts we'd like to go with. The first and third options can be combined if desired. Packages that have a match in common or the other platform could use a bottom level platform package, and either everything else or just the Mixins that provide platform specific APIs could use the top level one.

mrmangohands commented 1 month ago

Edited for clarity