Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Tutorial A Simple Minecraft forge Runtime Injecting Client like vape Tutorial

ImCzf233

New member
Joined
Apr 25, 2022
Messages
2
Reaction score
1
Points
0
This is a simple forge injecting tutorial
1. If you want Create a injection client, you must remember this:
  1. Mixin is not allowed in injection, such as liquidbounce.
  2. Some ASM Bytecode Mod is not allowed
  3. Vanilla/Badlion/LunarClient injection need there mapping, you should deobf it frist
2. Create a forge mod work space
You should create a forge MDK work space in Eclipse or intelli IDEA, And init it, put a Main class for this project:
Java:
@Mod(modid="YourClientName", name="YourClientName", acceptedMinecraftVersions="[1.8.9]")
public class ForgeMod {

    @Mod.EventHandler
    public void Mod(FMLPreInitializationEvent event) {
        // put you client init code here
         new Client(); // <- this is a example
    }
}

this make the forge can load your client as mod. and JNI module can find your client entry

3. Create a Main Class
This is a example, Although you can put the client and forge entry together, it is not conducive to the agent
Java:
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class Client {
    public Client() {
        MinecraftForge.EVENT_BUS.register(this);
        FMLCommonHandler.instance().bus().register(this);
    }

    @SubscribeEvent
    public void Render2D(RenderGameOverlayEvent.Text event) {
        mc.fontRendererObj.drawString("Client",4,4, -1);
    }
}

4. Create modules
Added some modules / gui / hud / utils in your client
**DO NOT USE MIXIN

5. Compile
use command gradlew build to build a jar
it will save to youproject/build/libs

6. get JNI module
download this :

and setup mingw-64

7. create a injectable dll
Copy the jar to dll files to libs folder, use
Bash:
 java -jar JavaDllPacker.jar <your client jar file> classes.h
command to make classes.h

and type
Bash:
g++ -Wall -DBUILD_DLL -O2 -std=c++11 -m64 -c main.cpp -o main.o

g++ -shared -Wl,--dll main.o -o ti-pidor.dll -s -m64 -static -static-libgcc -static-libstdc++ -luser32

generated ti-pidor.dll is your client dll, launch a minecraft 1.8.9 with forge and inject this dll with process hacker2, you client will injected!
 
for those who need, good post
i dont point any flaws necaserily, will give these a go myself but i am more focuse visually developing than a good working client xD
 
damn since when was it that simple xd
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top