mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 19:39:06 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
f1dea5460a
commit
f106b5e766
172 files changed
+2552
-2088
No files matched your search
@@ -3,11 +3,13 @@ package codechicken.nei.asm;
|
||||
import static org.objectweb.asm.Opcodes.POP;
|
||||
import static org.objectweb.asm.Opcodes.PUTSTATIC;
|
||||
|
||||
import codechicken.lib.asm.ASMHelper;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
|
||||
import codechicken.lib.asm.ASMHelper;
|
||||
|
||||
public class GuiContainerManagerAPITransformer extends ClassVisitor {
|
||||
|
||||
private final String tname;
|
||||
private boolean changed = false;
|
||||
|
||||
@@ -19,14 +21,18 @@ public class GuiContainerManagerAPITransformer extends ClassVisitor {
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String mname, String mdesc, String signature, String[] exceptions) {
|
||||
return new MethodVisitor(api, super.visitMethod(access, mname, mdesc, signature, exceptions)) {
|
||||
|
||||
@Override
|
||||
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
|
||||
if (opcode == PUTSTATIC
|
||||
&& "codechicken/nei/guihook/GuiContainerManager".equals(owner)
|
||||
if (opcode == PUTSTATIC && "codechicken/nei/guihook/GuiContainerManager".equals(owner)
|
||||
&& name.endsWith("Handlers")
|
||||
&& desc.equals("Ljava/util/LinkedList;")) {
|
||||
ASMHelper.logger.warn(
|
||||
"Found suspicious PUTSTATIC {} in {}#{}{}, replacing with POP!", name, tname, mname, mdesc);
|
||||
"Found suspicious PUTSTATIC {} in {}#{}{}, replacing with POP!",
|
||||
name,
|
||||
tname,
|
||||
mname,
|
||||
mdesc);
|
||||
changed = true;
|
||||
super.visitInsn(POP);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user