Function Compiler

Function Compiler

This mod allows the server to automatically compile most of the functions to Java bytecode

von
11.2K Downloads
fabricquiltoptimization
Server mit dieser Mod mieten

Über diese Mod

This mod has only been updated up to 1.21.4, because 1.21.5 completely changed the SNBT parser and accessing, which made me slightly less motivated to work on this project. (perhaps 26.1)

Function Compiler

This mod allows the server to compile functions from datapacks on load to Java bytecode, which results in increased performance, because compiled code can run everything at once instead of running commands one by one.

Some statistics are automatically collected when using this mod. Feel free to check the code to check what is reported, but the main things are: timings, function counts, instruction counts, exceptions/crashes (those might contain the commands for debugging).

This mod will not respect the maxCommandChainLength gamerule to improve performance, otherwise it would require the compiled code to check the amount of commands ran, which could be slow.

Usage

Put the mod on a fabric server with all the dependencies, the mod will automatically try to optimize all functions and commands which are supported.

If you encounter any crashes, they will be automatically reported. If you have more context to how to trigger a crash, please report it on the issue tracker.

Supported Commands

Of course this mod can't support every command, so it will only generate code for functions which contain only commands which are supported. Currently, this will not compile every function with macros. It can't compile some macros because any value could be interpreted in any way, which is hard to implement using only things known at compile-time, but some things could be guessed.

The list of commands supported currently as of 0.3.2-alpha.2 can be found in the Command Support file.

Supported Selectors

All the selectors are supported, and all their options.

How it works

This mod works by using Java's class loader: It generates bytecode for the functions at runtime and loads them. If you'd like you can always look at the source here.

Verfügbare Versionen

Function Compiler 0.3.2-alpha.2 [1.21.4]alpha
MC 1.21.4fabric, quilt
16. März 2025
Function Compiler 0.3.2-alpha.2 [1.21.2-1.21.3]alpha
MC 1.21.2, 1.21.3fabric, quilt
16. März 2025
Function Compiler 0.3.2-alpha.2 [1.21-1.21.1]alpha
MC 1.21, 1.21.1fabric, quilt
16. März 2025
Function Compiler 0.3.2-alpha.2 [1.20.5-1.20.6]alpha
MC 1.20.5, 1.20.6fabric, quilt
16. März 2025
Function Compiler 0.3.2-alpha.2 [1.20.3-1.20.4]alpha
MC 1.20.3, 1.20.4fabric, quilt
16. März 2025

Function Compiler auf dem Server installieren

1

Server bestellen

Bestelle einen Minecraft Java Server mit mindestens 3 GB RAM (4 GB empfohlen).

2

fabric Loader setzen

Wähle im Panel unter "Egg" den fabric-Loader und die passende Minecraft-Version (1.21.4).

3

Mod installieren

Öffne den Mod-Browser im Dashboard und suche nach "Function Compiler". Klicke "Installieren" – fertig! Alternativ: Lade die .jar via SFTP in den /mods Ordner.

Kompatibilität

Mod-Loader

fabricquilt

Minecraft-Versionen

1.21.4, 1.21.3, 1.21.2 (+10 weitere)

Server-seitig

Erforderlich

Empfohlener RAM

4 GB(min. 3 GB)

Häufige Fragen

Function Compiler Server crasht beim Start – was tun?

Häufigste Ursache: falsche fabric-Version oder zu wenig RAM. Prüfe im Server-Log (latest.log), ob ein "OutOfMemoryError" oder "Mixin"-Fehler auftritt. Bei Mado Hosting: Stelle sicher, dass mindestens 3 GB RAM zugewiesen sind und der Loader zur Mod-Version passt (1.21.4). Über das Panel kannst du den Loader mit einem Klick wechseln.

Ist Function Compiler mit fabric und quilt kompatibel?

Function Compiler unterstützt offiziell fabric, quilt für Minecraft 1.21.4, 1.21.3, 1.21.2. Im Mado Dashboard werden inkompatible Loader-Kombinationen automatisch erkannt.

Server laggt mit Function Compiler – wie optimiere ich die Performance?

Empfohlener RAM: 4 GB (+1 GB pro 8 Spieler). Prüfe mit /spark profiler, ob Function Compiler den meisten Tick-Time verbraucht. Häufige Fixes: Server-View-Distance auf 8-10 reduzieren, bei Forge "performant" oder "starlight" als Zusatz-Mod installieren. Bei Mado Hosting läuft dein Server auf NVMe-SSDs mit dedizierten CPU-Kernen für minimale Latenz.

Modded Server mieten

Installiere Function Compiler mit nur einem Klick auf deinem Server.

Empfohlener RAM
4 GBab €5.2/Monat
Min. 3 GB | +1 GB pro 8 Spieler
Jetzt Server erstellen
1-Klick Mod Installation
NVMe SSD Speicher
DDoS-Schutz inklusive

Details

Lizenz
GNU Lesser General Public License v3.0 only
Server-seitig
Erforderlich

Unterstützte Versionen

1.21.41.21.31.21.21.21.11.211.20.61.20.51.20.41.20.31.20.2+3 mehr