Hello, I'm attempting to rewrite a minecraftforge method in net.minecraft.block.Block,
boolean removeBlockByPlayer(World, EntityPlayer, Int, Int, Int)
I start by first removing the original method with a ClassVisitor and an overloaded visitMethod that returns null. I then try to use a MethodVisitor to rewrite the bytecode. Unfortunately, it seems to be rewriting the net.minecraft.block.Block constructor rather than the intended function, though I have determined that removeBlockByPlayer is indeed deleted by iterating through the ClassNode.methods list.
My code is as follows:
FML output is as follows:
I apologize for any silly mistakes I may have made. I primarily code in C/C++ and have only recently taken an interest in Minecraft modding.