This is a simple forge injecting tutorial
1. If you want Create a injection client, you must remember this:
You should create a forge MDK work space in Eclipse or intelli IDEA, And init it, put a Main class for this project:
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
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
command to make classes.h
and type
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!
1. If you want Create a injection client, you must remember this:
- Mixin is not allowed in injection, such as liquidbounce.
- Some ASM Bytecode Mod is not allowed
- Vanilla/Badlion/LunarClient injection need there mapping, you should deobf it frist
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
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!