I try to make a coremod on 1.12.2 Forge in order to patch some missing stuff in the Lost Cities mod. (Source: https://github.com/McJtyMods/LostCities/blob/1.12/src/main/java/mcjty/lostcities/dimensions/world/lost/BuildingInfo.java) A friend and I have written this LostCitiesClassTransformer.java: (Full source: https://github.com/Nick1st/LCPatches) The original code I want to patch (Bytecode Outline): The Bytecode Outline containing my changes: The stacktrace I get: Why do I monkey-patch a open-source mod?
Tag: java-bytecode-asm
Forge 1.12.2 Coremodding: java.lang.ClassCircularityError
I try to make a coremod on 1.12.2 Forge in order to patch some missing stuff in the Lost Cities mod. (Source: https://github.com/McJtyMods/LostCities/blob/1.12/src/main/java/mcjty/lostcities/dimensions/world/lost/BuildingInfo.java) A friend and I have written this LostCitiesClassTransformer.java: The original code we want to patch (Bytecode Outline): The Bytecode Outline containing our fix: The Stacktrace we get: What we tried: We tried to get the building using
How to dynamically cast an object (of class Object) to the method return type using ASM?
What I want to do is to modify a method using ASM: I push an object (of class Object) to the stack I want to cast that object to the return type of that method Return that casted object. My code in …
ASM: how to easily get proper Opcode based on type
I am using ASM to generate Java bytecode. I have a need to create a dynamic proxy which can override basically any kind of method with additional post-processing. I am able to do it all, but there is one thing I can’t see how to do in a nice way. The type of the first parameter to the method I
is there hash code / Heap address for primitive types in Java?
I was trying to find some approximization to address on heap , and you guys gave me the function System.IdentityHashCode(Object). The problem is – this function doesn’t fit for primitive types. I’ll explain why. I’m given as input Java compiled program – class file. My goal is to plot some graphs that will contain some information about variable access between