H
H
holyshitplayer2020-10-08 02:06:44
Java
holyshitplayer, 2020-10-08 02:06:44

How to precompile a Minecraft modpack?

If you know, then minecraft can be modified with various mods. And when you start the build with mods, the mod classes are loaded into the original .jar of minecraft itself. Every time you restart the game, the same thing happens. And if the assembly is large, then its startup time becomes very large (I have an SSD, and even it takes quite a lot of time).
Question:
Is it possible to precompile initially so that this does not happen during startup, thereby speeding up the download speed of the entire assembly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
antonwx, 2020-10-08
@antonwx

The so-called "precompilation", namely the translation into bytecode, has already been completed. Mods register themselves, subscribe to events, add blocks, textures, etc. In theory it is possible to save the state of a process to disk, but in practice it is very difficult to the point of practical impossibility. https://stackoverflow.com/questions/712876/save-a-...

A
acwartz, 2020-10-08
@acwartz

The correct word is "caching".
Similar to what games like Zero Down ported from a curling iron do, at the first start / update, the resources are compiled for the specific settings of a particular PC and are in a ready state, then they are simply loaded.
The modding layer, which actually gives mods the opportunity to exist, must remember in a convenient format all the information that the mods throw off, as well as implement feedback so that the mod, having received a link to its cache, quickly checks everything and tells whether it is necessary to update something in the cache or it'll do. Based on this, the loader decides to reassemble a certain resource. it has been changed. And mods should also support and even implement such a function (those mods that are also expanded by mods),
mods that change the graphical component (hello shaders, and other OpenGL extensions) should also support working with the cache, but it’s up to you to decide whether the texture / shader is needed in recompilation, etc. and also be able to dump this data into the cache.
And then maybe it will take off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question