Jump to content

jumpak

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jumpak's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, I would like to ask if there is a function or way in Forge's source code to load a mod during runtime, after all the mods have been loaded. Perhaps to reload the mods? Thanks, Best Regards - Jumpak.
  2. Hello guys, so recently I've made a topic here on forge forums asking something about forge classloader and forge obfuscation. I was asking a question about how forge works, but instead of reading my full post they were asking me why am I using C++ to write a Minecraft mod when I clearly wasn't! They were telling me to use coremodding or what. Then LexManos came in and told me that "I have no idea what am I doing..". So, what should I know before doing this ??
  3. Yeah, I might lok into how Java is executed internally, but I know the basics of Java. Everything's working now!
  4. Oh.. I didn't notice that ! Now I know xD btw I'm not blaming you guys but I've clearly specified that in the post.
  5. I know I've should be supposed to know what I'm doing, but I've created a Java Agent, attached the Java Agent to forge, then from the javaagent I invoked the method findClass from the field classLoader in the class net.mnecraft.launchwrapper.Launch with the parameter of the Minecraft class name (net.minecraft.client.Minecraft) and it successfully returned the class! Unfortunately, the methods in the class are obfuscated :c Do you know why this is ?
  6. So I've decided to switch to Java Agents. I will try this using attaching a Java Agent to forge guys, and see if it will work. I will reply here.
  7. Because I want to try "injecting" into Minecraft.
  8. Yes, I know that but I want to make like an Minecraft autoclicker, which I could just do by simulating mouse clicks, but this way it's better. I have no clue why the class doesn't have the getMinecraft method. Today I will look into some forge mod coding, but still if you have any ideas why this isn't working I would be happy if you posted them.
  9. Yeah I know what you mean but does this work from java? I mean if I use the findClass method from the classloader to find the Minecraft class will it have the getMinecraft method?
  10. Yes, I know but I'm not trying to write a mod, I'm just trying to call the clickMouse method from C++, and I know everything is right so there has to be something wrong with forge, that's why I've started this topic here on Forge. For some reason the class does not contain the getMinecraft method, as I've said above. Do you guys know why this might be?
  11. Hello, so recently I've got an idea to create a simple autoclicker in Minecraft, when I've discovered JNI. Java Native Interface (JNI) is a C++ framework from Java enables code inside a JVM (java virtual machine) to be called from for example C++. So I've found C++ code for a simple C++ program that would attach to Minecraft Forge JVM(because original Minecraft is obfuscated and I've chose Forge) using JNI, get the Forge class loader if I understand it correctly and then use a method from it to get the Minecraft class. Here's what it does (this should be right): 1. It finds the class net.minecraft.launchwrapper.LaunchClassLoader 2. It gets the static field (it's an object that's a class) classLoader from it. 3. It executes a method in the classLoader called findClas with the parameters of the Minecraft class name (net.minecraft.client.Minecraft). This code is working correctly as intended, it successfully returns the Minecraft class. However when I try to get the method getMinecraft from the class it says that the method is null (it probably doesn't exist). I'm 100% sure that the C++ code is working correctly but for some reason it can't find the method in the class. I've also tried getting the theMinecraft static field (which should be the instance of Minecraft class) from the Minecraft class, but that is null also. Do you guys know what is wrong here? Also, if you want I can post the C++ code but I'm 100% sure it's correct. EDIT: The reason why this was not working is because THE CLASS WAS REOBFUSCATED! Best Regards - Martin.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.