Giter Site home page Giter Site logo

minecraftexternalmodloader's Introduction

Minecraft External Modloader

Link to minecraftforum.net-Discussion

This piece of Software allows you to manipulate the behaivior of Java-Programs by exchanging classes with your own modified ones.
Which is especially used in Minecraft-Modding and this will be the intended use for this program, but it might be possible to use this for any other java programs as well.
The normal way of exchanging classes is to open the .jar file with an archive program and replace .class files. If the jar is signed you also have to delete the META-INF folder.

This Program will not replace any .class files in any jar file, but will modify the way java loads classes to get the same result.

How to use with Minecraft

  1. Install Mods
  2. Download the minecraft.jar from http://minecraft.net/download ( Show all Platforms -> Minecraft for Linux/Other -> minecraft.jar )
    WARNING: This is a different minecraft.jar then the one you can find in the bin folder of your Minecraft installation!
  3. Place the MinecraftExternalModloader.jar next to this minecraft.jar (the launcher, not the one in bin!)
  4. Start the MinecraftExternalModloader.jar by double-clicking or with java -jar MinecraftExternalModloader.jar on the commandline This will bring up the default Mojang Minecraft-Launcher which will then hopefully launch your modded Minecraft.

How to install Mods

  1. Create a folder named mod inside your Minecraft Installation Folder (%APPDATA%\.minecraft on Windows, ~/.minecraft on Linux ...)
  2. Extract the mod you want to install into that folder (The parts that normally would go into the minecraft.jar)

Experts

The program contains two parts.
GenerateStartCommand generates a command-line that has all the needed parameters to launch StartMinecraft which will then inject the ReplacingClassLoader to load mods.
Run java -jar MinecraftExternalModloader.jar -dummy. To get the command-line that is generated to launch StartMinecraft.
This will output something like

javaw -Xmx1024m -Djava.library.path="/C:/Users/YourName/AppData/Roaming/.minecraft/natives" -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -classpath [classpath ommitted] mapeper.minecraft.modloader.StartMinecraft file:/C:/Users/YourName/AppData/Roaming/.minecraft/mod/

on Windows 7.

file:/C:/Users/YourName/AppData/Roaming/.minecraft/mod/ is the folder the mods will get loaded from. The Inner-Program will allow you to specify multiple URLs. Even http(s) links to jar files are supported but not recommended. You can now create your personal batch/bash-Script to launch your mods.
This will skip the first step of the Minecraft-Launching

Credits

Thanks to the great Amazon-Kindle-Hacker ixtab who showed me the right technique in his JBPatcher (Source Code on bitbucket.org).
Also thanks to the MCP-Guys for making Minecraft-Modding possible.

minecraftexternalmodloader's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

minecraftexternalmodloader's Issues

Filechooser Directory Problems (Too many of them)

Too many file choosers cause distraction, because every new File chooser starts in user.home.

This makes saving the exported script next to the config file next to the minecraft base dir very painful.

Can't load LauncherFrame

C:\Users\Adam>E:\test.bat

C:\Users\Adam>"C:/Program Files/Java/jre7/bin/java.exe" "-Xmx1024m" "-Djava.library.path="C:/Users/Adam/AppData/Roaming/.minecraft/bin/natives"" "-classpath" "C:\Users\Adam\AppData
Roaming.minecraft\bin\MinecraftExternalModloader.jar;C:\Users\Adam\AppData\Roaming.minecraft\bin\minecraft.jar;C:/Users/Adam/AppData/Roaming/.minecraft/bin/jinput.jar;C:/Users/Ada
m/AppData/Roaming/.minecraft/bin/lwjgl.jar;C:/Users/Adam/AppData/Roaming/.minecraft/bin/lwjgl_util.jar;C:/Users/Adam/AppData/Roaming/.minecraft/bin/minecraft.jar;" "mapeper.minecraf
t.modloader.StartMinecraft" "-c" "net.minecraft.LauncherFrame" "file://C:/Users/Adam/AppData/Roaming/.minecraft/mod/" "--"

Log start timestamp: Sat May 25 23:48:02 EST 2013
Bootstrap OK, PatchingClassLoader instantiated
Packages still handled by original ClassLoader:

  • memplugin
  • mapeper.minecraft.modloader

Could not load class: net.minecraft.LauncherFrame
java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at mapeper.minecraft.modloader.StartMinecraft.startMainMethod(Unknown Source)
at mapeper.minecraft.modloader.StartMinecraft.main(Unknown Source)

Don't add / when on Windows

In Windows, MEM creates paths that look like /C:/blah/blah

This should probably be C:\blah\blah, and the initial forward slash breaks things.

The mincraft.jar was apparently compiled with another version of Java.

Gotta' love the useless bug reports you get. Let me try being more precise.

I'm getting an UnsupportedClassVersionError following the instructions on githiub.
this is usually a java bytecode incompatibility issue.

minecraft.jar was downloaded a few minutes ago so its whatever is officially curent.

Here is the java I'm using on OSX:

tefnut:mod mpappin$ java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)

and the error is:

efnut:mod mpappin$ java -jar MinecraftExternalModloader.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: mapeper/minecraft/modloader/config/gui/ConfigFrame : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.