Skip to content

Commit 1f7da1d

Browse files
committed
Fix mixin scanning fix not actually working due to typo when backporting
1 parent dcbc3e0 commit 1f7da1d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

common/src/main/java/org/embeddedt/modernfix/core/ModernFixMixinPlugin.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,11 @@ private void applyBlockStateCacheScan(ClassNode targetClass) {
248248

249249
// We now know all methods that have been injected into initCache, and their callers. See what fields they write to
250250
writingMethods.forEach((name, method) -> {
251-
if(cacheCalledInjectors.contains(name)) {
252-
for(AbstractInsnNode n : method.instructions) {
253-
if(n instanceof FieldInsnNode) {
254-
FieldInsnNode fieldAcc = (FieldInsnNode)n;
255-
if(fieldAcc.getOpcode() == Opcodes.PUTFIELD && fieldAcc.owner.equals(targetClass.name)) {
256-
accessedFieldNames.add(fieldAcc.name);
257-
}
251+
for(AbstractInsnNode n : method.instructions) {
252+
if(n instanceof FieldInsnNode) {
253+
FieldInsnNode fieldAcc = (FieldInsnNode)n;
254+
if(fieldAcc.getOpcode() == Opcodes.PUTFIELD && fieldAcc.owner.equals(targetClass.name)) {
255+
accessedFieldNames.add(fieldAcc.name);
258256
}
259257
}
260258
}

0 commit comments

Comments
 (0)