pulse
gitlabAdaptive Performance Manager for Minecraft that intelligently monitors rendering performance and adjusts visual quality dynamically.
clone
https://gitlab.com/bitzzdev/pulse.gitadaptive-qualityfabricfps-boostminecraftminecraft-modoptimizationperformance
# Module Implementation TemplateUse this template to create new Pulse optimisation modules.## Step 1: Create the PackageCreate a new package under `src/main/java/io/github/yourorg/pulse/module/<name>/`.## Step 2: Implement the Module Interface```javapackage io.github.yourorg.pulse.module.<name>;import io.github.yourorg.pulse.module.Module;public class <Name>Module implements Module {private int currentLevel;private final <Name>Config config;public <Name>Module(<Name>Config config) {this.config = config;this.currentLevel = config.maxLevel();}@Overridepublic String id() {return "<name>";}@Overridepublic String displayName() {return "<Display Name>";}@Overridepublic int levelCount() {return config.maxLevel();}@Overridepublic int currentLevel() {return currentLevel;}@Overridepublic void applyLevel(int level) {this.currentLevel = level;// Apply the level to the relevant game state}@Overridepublic float costImpact() {// Return a normalised cost multiplier (0.0 = no cost, 1.0 = max cost)return (float) currentLevel / config.maxLevel();}}```## Step 3: Add Config OptionsIn `io.github.yourorg.pulse.config.PulseConfig`, add a nested config class:```javapublic static class <Name>Config {@ConfigEntry(name = "enabled")public boolean enabled = true;@ConfigEntry(name = "maxLevel")public int maxLevel = <default>;@ConfigEntry(name = "minLevel")public int minLevel = 1;}```## Step 4: Register the ModuleIn `io.github.yourorg.pulse.module.ModuleRegistry`, add:```javaregistry.register(new <Name>Module(config.<name>));```## Step 5: Add Compatibility RulesIf the new module conflicts with existing mods, add rules in `io.github.yourorg.pulse.compat.CompatibilityChecker`.## Step 6: DocumentAdd configuration entries to `CONFIGURATION.md` and if the module is notable, add it to `README.md`.## Guidelines- Each module must be **independently disableable**.- Level transitions must be **instant** and **safe to call every frame**.- Do not allocate memory during `applyLevel()` — allocate in the constructor.- Use the cost impact value to help the BudgetScheduler decide activation order.- Test with both vanilla and Sodium rendering pipelines.