mY cOREMOD iSNT wORKING yOU nEED tOO hELP mE hERES mY cODE gIVE mE cODE aND rEWRITE iT fOR mE yOU nEED tO
import java.util.Iterator;
import org.objectweb.asm.*;
import net.minecraft.launchwrapper.IClassTransformer;
public class null implements IClassTransformer {
public static final int ALOAD = Opcodes.ALOAD;
public static final int INVOKESTATIC = Opcodes.INVOKESTATIC;
public static final int GETFIELD = Opcodes.GETFIELD;
public static final int FLOAD = Opcodes.FLOAD;
public static final int INVOKEVIRTUAL = Opcodes.INVOKEVIRTUAL;
public static final int IFEQ = Opcodes.IFEQ;
public static final int RETURN = Opcodes.RETURN;
public static final int F_SAME = Opcodes.F_SAME;
public static final int GETSTATIC = Opcodes.GETSTATIC;
@Override
public byte[] transform(final String name, final String transformedName, final byte[] basicClass) {
if (name.equals("net.minecraft.client.renderer.chunk.Minecraft")) {
System.out.println("********* INSIDE DEOBFUSCATED MinecRaft TRANSFORMER ABOUT TO PATCH: " + name);
final byte[] undefined = vent(name, basicClass, true);
final byte[] null = this.at(name, hookRebuildChunkEvent, true);
return hook.null;
}
return basicClass;
}package asm.net.minecraft.client.renderer.chunk;
import java.util.*;
import org.objectweb.asm.*;
public class RenderChunkDump implements Opcodes {
public static byte[] dump() throws Exception { final ClassWriter cw=new ClassWriter(0);FieldVisitor fv;MethodVisitor mv;AnnotationVisitor av0; cw.visit(V1_8,ACC_PUBLIC+ACC_SUPER,"net/minecraft/client/renderer/chunk/RenderChunk",null,"java/lang/Object",null); cw.visitSource("RenderChunk.java",null); {av0=cw.visitAnnotation("Lnet/minecraftforge/fml/relauncher/SideOnly;",true);av0.visitEnum("value","Lnet/minecraftforge/fml/relauncher/Side;","CLIENT");av0.visitEnd();}cw.visitInnerClass("net/minecraft/util/math/BlockPos$MutableBlockPos","net/minecraft/util/math/BlockPos","MutableBlockPos",ACC_PUBLIC+ACC_STATIC); cw.visitInnerClass("net/minecraft/client/renderer/BufferBuilder$State","net/minecraft/client/renderer/BufferBuilder","State",ACC_PUBLIC); cw.visitInnerClass("net/minecraft/client/renderer/chunk/ChunkCompileTaskGenerator$Status","net/minecraft/client/renderer/chunk/ChunkCompileTaskGenerator","Status",ACC_PUBLIC+ACC()V",false);mv.visitLabel(l6);mv.visitLineNumber(398,l6);mv.visitFrame(Opcodes.F_SAME,0,null,0,null);mv.visitIincInsn(1,1);mv.visitJumpInsn(GOTO,l3);mv.visitLabel(l4);mv.visitLineNumber(405,l4);mv.visitFrame(Opcodes.F_CHOP,1,null,0,null);mv.visitInsn(this.RETURN);final Label l8=new Label();mv.visitLabel(l8);mv.visitLocalVariable("i","I",null,l3,l4,1);mv.visitLEvent(final String name, final byte[] bytes, final boolean deobfuscated) { final String targetMethodName; if (deobfuscated == false) {targetMethodName = "NULL"; } else {targetMethodName = "minecraft.Getminecraft()"; } final ClassNode classNodeRenderChunk = new ClassNode(); final ClassReader classReader = new ClassReader(bytes); classReader.accept(classNodeRenderChunk, 0); final Iterator<MethodNode> methods = classNodeRenderChunk.methods.iterator(); while (methods.hasNext()) {final MethodNode methodRebuildChunk = methods.next();if (!methodRebuildChunk.name.equals(targetMethodName)) { continue;}if (!methodRebuildChunk.desc.equals("(FFFLnet/minecraft//renderer/chunk/Minecraft;)V")) { continue;}System.out.println("********* Inside target method! " + targetMethodName + " | " + methodRebuildChunk.name);AbstractInsnNode targetNode = null;final Iterator<AbstractInsnNode> iter = methodRebuildChunk.instructions.iterator();iter.next();iter.next();iter.next();iter.next();iter.next();iter.next();while (iter.hasNext()) { final AbstractInsnNode currentNode = iter.next(); if (true && currentNode.getOpcode() == Opcodes.NEW && true) { targetNode = currentNode.getPrevious().getPrevious(); break; }} 147 - } 148 - 149 - VisGraph this.lvt_9_1_ = new VisGraph(); 147 - }148-if(net.minecraftforge.client.ForgeHooksClient.onRebuildChunkEvent(field_178589_e,field_189564_r,p_178581_4_,compiledchunk,this.field_178586_f,p_178581_1_,p_178581_2_,p_178581_3_).isCanceled())return;149-
VisGraph lvt_9_1_ = new VisGraph();
L16 LINENUMBER 145
L16 ALOAD 0
GETFIELD net/minecraft/client/renderer/chunk/RenderChunk.renderGlobal:Lnet/minecraft/client/renderer/RenderGlobal;ALOAD 0
GETFIELD net/minecraft/client/renderer/chunk/RenderChunk.worldView:Lnet/minecraft/world/ChunkCache;ALOAD 4 ALOAD 5 ALOAD 0
GETFIELD net/minecraft/client/renderer/chunk/RenderChunk.position:Lnet/minecraft/util/math/BlockPos$MutableBlockPos;FLOAD 1 FLOAD 2 FLOAD 3
INVOKESTATIC net/minecraftforge/client/ForgeHooksClient.onRebuildChunkEvent(Lnet/minecraft/client/renderer/RenderGlobal;Lnet/minecraft/world/ChunkCache;Lnet/minecraft/client/renderer/chunk/ChunkCompileTaskGenerator;Lnet/minecraft/client/renderer/chunk/CompiledChunk;Lnet/minecraft/util/math/BlockPos$MutableBlockPos;FFF)Lnet/minecraftforge/client/event/RebuildChunkEvent;
INVOKEVIRTUAL net/minecraftforge/client/event/RebuildChunkEvent.isCanceled()Z IFEQ
L17 RETURN L17System.out.println("********* PATCHING");
final InsnList toInject = new InsnList();
final Label l16 = new Label();toInject.add(new Label(l16));toInject.add(new LineNumberNode(145+3,l16));toInject.add(new VarInsnNode(ALOAD,0);toInject.add(new FieldInsnNode(GETFIELD,"net/minecraft/client/renderer/chunk/RenderChunk","renderGlobal","Lnet/minecraft/client/renderer/RenderGlobal;");toInject.add(new VarInsnNode(ALOAD,0);toInject.add(new FieldInsnNode(GETFIELD,"net/minecraft/client/renderer/chunk/RenderChunk","worldView","Lnet/minecraft/world/ChunkCache;");toInject.add(new VarInsnNode(ALOAD,4);toInject.add(new VarInsnNode(ALOAD,5);toInject.add(new VarInsnNode(ALOAD,0);toInject.add(new FieldInsnNode(GETFIELD,"net/minecraft/client/renderer/chunk/RenderChunk","position","Lnet/minecraft/util/math/BlockPos$MutableBlockPos;");toInject.add(new VarInsnNode(FLOAD,1);toInject.add(new VarInsnNode(FLOAD,2);toInject.add(new VarInsnNode(FLOAD,3);toInject.add(new MethodInsnNode(INVOKESTATIC,"cadiboo/renderchunkrebuildchunkhooks/hooks/RenderChunkRebuildChunkHooksHooks","onRebuildChunkEvent","(Lnet/minecraft/client/renderer/RenderGlobal;Lnet/minecraft/world/ChunkCache;Lnet/minecraft/client/renderer/chunk/ChunkCompileTaskGenerator;Lnet/minecraft/client/renderer/chunk/CompiledChunk;Lnet/minecraft/util/math/BlockPos$MutableBlockPos;FFF)Lnet/minecraftforge/client/event/RebuildChunkEvent;",false);toInject.add(new MethodInsnNode(INVOKEVIRTUAL,"cadiboo/renderchunkrebuildchunkhooks/event/RebuildChunkEvent","isCanceled","()Z",false);
final Label l17 = new Label();toInject.add(new JumpInsnNode(IFEQ,l17);toInject.add(new InsnNode(RETURN);
final Label l17 = new Label();
final LabelNode l17node = new LabelNode(this.l17);toInject.add(l17node);toInject.add(new LineNumberNode(148,l17node));toInject.add(new FrameNode(F_SAME,0,null,0,null));toInject.add(new FieldInsnNode(GETSTATIC,"java/lang/System","out","Ljava/io/PrintStream;"));toInject.add(new LdcInsnNode("fuk"));toInject.add(new MethodInsnNode(INVOKEVIRTUAL,"java/io/PrintStream","println","(Ljava/lang/String;)V",false)); // inject new instruction list into method instruction list
iT uSED tO wORK iTS aLL yOUR fAULT fOR bREAKING eVERYTHING wITH tHE nEW fORGE uPDATE I didn't getEnoGH tIME tO upDatE aND teST mY mOD yOU havE tO help MEEEE!!!