mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 22:19:34 +00:00
fix overwrite, static shadows not being remapped at runtime
This commit is contained in:
1 parent
59db546c22
commit
ec491e3b5d
1 file changed
+7
-6
+7
-6
@@ -419,9 +419,6 @@ class MixinPreProcessorStandard {
|
||||
Method method = this.getSpecialMethod(mixinMethod, type);
|
||||
MethodNode target = context.findMethod(mixinMethod, annotation);
|
||||
if (target == null) {
|
||||
if (type.isOverwrite) {
|
||||
return false;
|
||||
}
|
||||
target = context.findRemappedMethod(mixinMethod);
|
||||
if (target == null) {
|
||||
throw new InvalidMixinException(this.mixin,
|
||||
@@ -731,7 +728,9 @@ class MixinPreProcessorStandard {
|
||||
throw new RuntimeException(new ClassNotFoundException(methodNode.owner.replace('/', '.')));
|
||||
}
|
||||
|
||||
Method method = owner.findMethodInHierarchy(methodNode, SearchType.ALL_CLASSES, ClassInfo.INCLUDE_PRIVATE);
|
||||
int includeStatic = (methodNode.getOpcode() == Opcodes.INVOKESTATIC
|
||||
? ClassInfo.INCLUDE_STATIC : 0);
|
||||
Method method = owner.findMethodInHierarchy(methodNode, SearchType.ALL_CLASSES, ClassInfo.INCLUDE_PRIVATE | includeStatic);
|
||||
metaTimer.end();
|
||||
|
||||
if (method != null && method.isRenamed()) {
|
||||
@@ -747,8 +746,10 @@ class MixinPreProcessorStandard {
|
||||
if (owner == null) {
|
||||
throw new RuntimeException(new ClassNotFoundException(fieldNode.owner.replace('/', '.')));
|
||||
}
|
||||
|
||||
Field field = owner.findField(fieldNode, ClassInfo.INCLUDE_PRIVATE);
|
||||
|
||||
int includeStatic = ((fieldNode.getOpcode() == Opcodes.GETSTATIC || fieldNode.getOpcode() == Opcodes.PUTSTATIC)
|
||||
? ClassInfo.INCLUDE_STATIC : 0);
|
||||
Field field = owner.findField(fieldNode, ClassInfo.INCLUDE_PRIVATE | includeStatic);
|
||||
metaTimer.end();
|
||||
|
||||
if (field != null && field.isRenamed()) {
|
||||
|
||||
Reference in new issue
Block a user