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

Deobf build task to allow mods building against baritone #3855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rfresh2
Copy link
Contributor

@rfresh2 rfresh2 commented Feb 27, 2023

Mods like Lambda (and previously kami blue) that bundle Baritone have been stuck on 1.2.15 for years. The baritone in ImpactDevelopment/maven is also still on 1.2.15.

If mods build against com.github.cabaletta.baritone:baritone-api:v1.2.17, Baritone's API classes reference obfuscated MC classes which need to not be obf to reference against at compile steps of the build.

This PR adds an explicit deobf jar that baritone builds.

Example of how this PR can be used by dependent mods

Definitely open to alternate solutions, I opted not to touch existing baritone artifacts to not break consumers that depend on them as they are.

@wagyourtail
Copy link
Collaborator

the real solution is to get a srg obf build (baritone-forge-unoptimized) instead of the notch ones. as fg.deobf can then work and won't have mapping issues if people use different mappings

@ZacSharp
Copy link
Collaborator

ZacSharp commented Feb 27, 2023

In that case we probably have to rename BetterBlockPos.x, BetterBlockPos.y and BetterBlockPos.z to work around md-5/SpecialSource#72 (or whatever else is incorrectly and incompletely remapping our public final fields).

Apart from that I can confirm that srg mapped Baritone is easier to handle as a dependency (and also as a normal mod installed in a dev/deobf environment).

@leijurv
Copy link
Member

leijurv commented Feb 27, 2023

so the idea is that you dev against deobf then when actually releasing your jar it would work against api?

what mappings would deobf use though? would this only solve the problem for certain mappings like mcp? like this wouldn't work for a fabric mod developer for new versions of Mc right? they'd need a -deobf-fabric? or could they just use -fabric?

@leijurv
Copy link
Member

leijurv commented Mar 1, 2023

i put this version up on the maven here ImpactDevelopment/maven@155f713

@ZacSharp
Copy link
Collaborator

ZacSharp commented Mar 1, 2023

what mappings would deobf use though? would this only solve the problem for certain mappings like mcp? like this wouldn't work for a fabric mod developer for new versions of Mc right? they'd need a -deobf-fabric? or could they just use -fabric?

It would only solve the problem for projects using the same mappings as Baritone (loader independent but fabric mods usually don't use mcp mappings).
See #3856 for how to do it.

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.

None yet

4 participants