Skip to content

3arthqu4ke/hmc-optimizations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMC-Optimizations

Version specific optimizations for the HeadlessMc runtime.

Mc-Runtime-Test | HMC | HMC-Specifics | HMC-Optimizations

CodeFactor GitHub All Releases GitHub Github last-commit

Warning

This is work in progress. We can confirm that it launches with Minecraft. But we are missing data from running this long term, it is possible that there are memory leaks. Also mods that have mixins in rendering functions and NEED them to be called will not work, because we skip that code.

Version specific optimizations for HeadlessMC. The goal of HeadlessMC is to make the Minecraft client run on the command line. It does so by hooking into the LWJGL library skipping all the code. This also makes it largely Minecraft version independent, as I only have to target the LWJGL library.

However, all the Minecraft code for rendering will still run; it is just the calls to LWJGL that do not do anything. Also, due to the inextensible nature of Javas Buffers, the LWJGL library patched by us still needs to allocate buffers when Minecrafts code tells it to, currently on the heap instead of off.

The goal of this project is to write mods that target Minecraft code specifically, patching out anything rendering related with Mixin. If you really want to bring your memory footprint down, we also recommend that you configure HeadlessMc to use dummy assets via the hmc.assets.dummy property.

Console output from a fresh, headless SinglePlayer world, without and with HMC-Optimizations:

> fps
1356 fps T: inffast fancy-clouds B: 2
> optimize
HMC-Optimizations enabled.
> fps
1826208 fps T: inffast fancy-clouds B: 2