Skip to content

Conversation

Su5eD
Copy link
Member

@Su5eD Su5eD commented Oct 31, 2022

Re-adds missing mod dependency AT + coremod detection based on FG2 code.

(Ugly) Gradle Hacks

Here's a brief explanation of the core parts of legacydev. The details are pretty well documented in code.

GradleForgeHacks

  1. searchCoremods and searchCoremods - searches for coremods on the classpath and adds them to the fml.coreMods.load system property so that they can be located by FML
  2. AtRegistrar - looks for the FMLAT manifest attribute in classpath jars. If found, it registers the jar to the ModAccessTransformer
  3. AccessTransformerTransformer - a coremod that deobfuscates the modifier names of all non-default access transformers. The original code was slightly modified to add support for custom AT subclasses some mods use (tested with InvTweaks). Mapping data is read using net.minecraftforge.gradle.GradleStart.csvDir system property, which points to a directory containing csv mapping files. This needs to be set by ForgeGradle.

AccessTransformerTweaker
Registers the AccessTransformerTransformer coremod.

CoremodTweaker
Injects location information for coremods added by GradleForgeHacks.

Build updates

  • Updated gradle to 7.5.1
  • Removed shadow jar. All of our dependencies are already shipped by minecraft.
  • Updated license headers to 2022

@TheCurle
Copy link
Member

Works in my testing.

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.

2 participants