about tweaks
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
info:tweak [2014/12/12 12:48] mumfrey |
info:tweak [2014/12/17 17:31] (current) mumfrey |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~META:title=about tweaks~~ | ~~META:title=about tweaks~~ | ||
+ | ~~NOTOC~~ | ||
What are 'Tweaks'? | What are 'Tweaks'? | ||
Line 15: | Line 16: | ||
It is the last capability which makes **Tweakers** so powerful, since hooking into the game's [[ClassLoader]] allows almost unlimited control over the game's internal code. | It is the last capability which makes **Tweakers** so powerful, since hooking into the game's [[ClassLoader]] allows almost unlimited control over the game's internal code. | ||
- | ====Differences to "Core Mods"==== | + | Differences to "Core Mods" |
+ | ========================== | ||
**Forge ModLoader (FML)** has a capability for a mod to elect to become a *"core mod"* which sounds very similar to the features just described for Tweakers above, and this is no coincidence. This is because **FML** is a **Tweak** itself and chooses to delegate its power to "core mods" which require it, any **Tweak** can do this and LiteLoader does so as well, although it doesn't make a distinction between "core mods" and "regular mods" and simply lets any mod supply [[transformers|Class Transformers]] if it wants to. | **Forge ModLoader (FML)** has a capability for a mod to elect to become a *"core mod"* which sounds very similar to the features just described for Tweakers above, and this is no coincidence. This is because **FML** is a **Tweak** itself and chooses to delegate its power to "core mods" which require it, any **Tweak** can do this and LiteLoader does so as well, although it doesn't make a distinction between "core mods" and "regular mods" and simply lets any mod supply [[transformers|Class Transformers]] if it wants to. | ||
In a nutshell, a "core mod" accepts delegated power from a **Tweaker** without becoming a **Tweak** itself, this makes it dependent on the first **Tweaker** and not on the Tweak System directly. | In a nutshell, a "core mod" accepts delegated power from a **Tweaker** without becoming a **Tweak** itself, this makes it dependent on the first **Tweaker** and not on the Tweak System directly. | ||
+ | |||
+ | How do they work? | ||
+ | ================= | ||
+ | |||
+ | Whilst it is incredibly powerful, the Tweak System itself is actually incredibly simple. It leverages a library called [LaunchWrapper](https://github.com/Mojang/LegacyLauncher) originally written by [[people:cpw]] for Mojang in order to allow them to run old versions of Minecraft inside the new launcher. To use **Tweak**s, **LaunchWrapper** is simply added to the game environment and the game's **main class** is replaced with **LaunchWrapper's main class**. Tweak classes can then simply be specified on the command line using ''--tweakClass'' arguments. | ||
+ | |||
+ | Multiple Tweaks and CascadedTweakers | ||
+ | ==================================== | ||
+ | |||
+ | Since the original aim of *LaunchWrapper* was to allow old versions of the game to be run in the new launcher, there was no provision made to allow more than one **Tweak** to be specified at a time. In version 1.7 of *LaunchWrapper*, [[people:cpw]] added the ability to specify multiple tweaks, but prior to that a contract of '*cascading*' tweakers was agreed between [[people:cpw]] and [[people:mumfrey|myself]] to allow whichever tweaker was loaded first to load the other. | ||
+ | |||
+ | This is why in newer versions of Minecraft you can simply specify multiple ''--tweakClass'' arguments but before that it was necessary to specify the first tweak using ''--tweakClass'' and additional tweaks using ''--cascadedTweaks'' | ||
+ |