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

Get ATs from mod dependencies #273

Closed
me4502 opened this issue Sep 28, 2015 · 7 comments
Closed

Get ATs from mod dependencies #273

me4502 opened this issue Sep 28, 2015 · 7 comments
Labels
feature request Requests a new feature to be added
Milestone

Comments

@me4502
Copy link

me4502 commented Sep 28, 2015

Hi,

Just throwing this suggestion out there. Say you are making an addon for a mod, but want to have access to all the AT-modified fields. You'd need to basically put a copy of that AT in your mod. I'm suggesting a way to specify mods to inherit AT from.

@diesieben07
Copy link
Contributor

This is not technically possible, since at the time where ATs are applied (before classes are loaded, ATs are ASM!) there is no inheritance information.
Instead of using ATs just use reflection.

@me4502
Copy link
Author

me4502 commented Sep 28, 2015

That's not the type of inheritance I am talking about. I am talking about mod-add ons inheriting the AT from the mods they enhance.

@diesieben07
Copy link
Contributor

Damn, actually reading would help... Sorry.
ATs are a global thing. They are not applied on the mod, they actually modify the targeted class. So, if one mod has an AT, that field/method is modified for everyone.

@AbrarSyed
Copy link
Member

You have to extract the AT of the dependency mods, and put them in src/api/java. Then rerun the setup.

It is planned to have this pulled from dependencies automatically in FG2, have to double check if I added that or not yet.

@me4502
Copy link
Author

me4502 commented Sep 28, 2015

Yeah, it's the automatic pulling of ATs that I was suggesting

@AbrarSyed AbrarSyed reopened this Sep 28, 2015
@AbrarSyed AbrarSyed added the feature request Requests a new feature to be added label Sep 28, 2015
@AbrarSyed AbrarSyed added this to the 2.0.2 milestone Sep 28, 2015
@AbrarSyed AbrarSyed changed the title Add 'Access Transformer Inheritance' - If a mod dependency has an Access Transformer, apply that to the decompiled source Get ATs from mod dependencies Sep 28, 2015
@AbrarSyed AbrarSyed modified the milestone: 2.0.2 Sep 28, 2015
@AbrarSyed
Copy link
Member

Currently available in in the 2.0 snapshot.
minecraft { useDepAts = true }
This will only get ATs defined in the manifest of the dependency and can be found in the META-INF folder of the dependency jar, as is done by FML.

@me4502
Copy link
Author

me4502 commented Oct 26, 2015

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests a new feature to be added
Projects
None yet
Development

No branches or pull requests

3 participants