* Fix adding fields to classes with more than one constructor
Got to be careful reusing `Label`s when calculating frames
* Reduce changes relative to upstream
`LabelNode#clone` does the equivalent to `labels.get` anyway, so might as well make it simpler
I'm moving this inside UniMixins instead, to mirror how Fabric keeps the
decoration initialization code inside Fabric loader.
This reverts commit 24c5ac4009.
* Fix unique fields crashing when staticness mismatches an existing field
FixesSpongePowered/Mixin#576
* Fix mismatching mixin fields silently being dropped
Allowing them to be included will throw a VerifyError
There was a small inaccuracy in the commit message of a8217ef280:
Everything I said about "extra mods" also applies to mod directory
mods (FML treats the two sets as one).
As proposed in https://github.com/SpongePowered/Mixin/issues/207
Fixes mods on the class path containing mixins not getting loaded as mods in a
1.7.10 development environment.
Background information:
Discovery of Forge mods roughly happens in the following 2 steps:
1. `findClassPathMods`: Discover Forge mods on the class path which are not in
the coremod list or the reparseable coremod list.
2. `findModDirMods`: Discover Forge mods that are in the mod directory, or
specified as *extra mods* using `--mods`.
It appears that the purpose of the reparseable mod list is to prevent a mod from
being discovered in both of the steps. This would happen with extra mods
containing both a coremod and a Forge mod, since they get injected into the
class path during coremod discovery (but since they get marked as reparseable,
this is avoided.)
Mixin needs to make sure the mod gets discovered in exactly one of the steps. We
can achieve this by only adding it to the reparseable list if it's not on the
boot class path. This causes only extra mods to get added.
In 59db546c22, IRemapper's contract was changed
so that mapMethodName and mapFieldName may be called with null arguments,
but RemapperAdapterFML was not changed to be able to handle this, causing a
NPE to happen in this case.
This commit adds an opt-in way for RemapperAdapter implementations to request
that the remapper should immediately no-op when invoked with null arguments,
and makes RemapperAdapterFML use it.
This was removed in 59db546c22, which caused
refmaps to get mapped to SRG but not back in 1.7.10 development environments.
This commit reimplements it using the remapper chain API.
The previous implementation gathers InjectionInfos for all annotated
methods in the target class, which after a previous injection means that
it'll see injected methods from unrelated mixins if they happen to
target the same class. This caused it to analyze foreign injections
without the proper refmap and mixin association.