-
Notifications
You must be signed in to change notification settings - Fork 4
Internals
As Orion re-uses some ideas from other solutions (like Sponge, Forge and Glowstone), then some similiarities are noticeable.
Paperclip jar will be downloaded, and server jar will be obtained using small wrapper I wrote.
As Orion Launcher tries to be as small as it can be, then it downloads all required dependencies from Maven using tiny client written by me.
Libraries are loaded to system classloader.
Bootstrap invokes LegacyLauncher to proceed to step 2
Tweak class deals with mod loading and dependency management. After that access transformers will be applied.
Mod classes will be scanned for @OrionMod annotation. First class is used as a mod class.
Bytecode reading is used, because it is faster and to avoid loading the class (as you can not unload class from classloader later).
As all mods are loaded to LaunchClassLoader, this means resources cannot have same name (like in Bukkit plugins - plugin.yml
in every jar file). I do not know which resource gets used when two jars provide same name resource.
CraftBukkit jar's main(String[] args)
will be called.
In this step, you see normal server startup. Except it utilizes modified classes now.
Orion is simple and consists from simple 3 steps! Nothing hard.