The Best Resource for Minecraft
The Best Resource for Minecraft

BetterFps Mod Wiki

BetterFps is a comprehensive performance-enhancing utility mod for Minecraft that optimizes mathematical calculations, memory management, and various block behaviors to eliminate lag spikes and increase frame rates.

5 sections · 746 words

Overview#

BetterFps is a vital performance mod designed to improve the smoothness of Minecraft by replacing the game's default mathematical algorithms and optimizing several resource-heavy mechanics. Unlike many other performance mods that focus on rendering, BetterFps targets the underlying calculations that the game performs thousands of times per second, such as sine and cosine functions used for entity movement and world rendering.

Performance comparison showing FPS increase with BetterFps mod

The mod is highly compatible with other optimization tools like Optifine and Fastcraft, making it a staple in large modpacks where CPU and RAM efficiency are critical. It provides a suite of togglable improvements, allowing players to tailor the performance boost to their specific hardware.

Core Mechanics: Math Algorithms#

The primary feature of BetterFps is the ability to change the algorithm Minecraft uses for sin and cos functions. The default Java Math algorithm is precise but can be slow on certain hardware. BetterFps offers several alternatives that trade a negligible amount of precision for significant speed gains.

Available Algorithms

Algorithm Description Performance Impact
Riven's Full A highly optimized lookup-table based algorithm. Generally the fastest for most modern CPUs.
Riven's Half A variation of Riven's that uses half the memory for the lookup table. Excellent balance of speed and memory usage.
LibGDX Based on the LibGDX framework's math implementation. Very similar to Riven's; highly efficient.
Taylor's Uses Taylor series expansion for calculations. Can be slower than Vanilla on some hardware; use with caution.
Java Math The default Java implementation. High precision, but often the slowest option.
Random Math A non-deterministic algorithm used for testing. Not recommended for standard gameplay.
Vanilla Math Minecraft's original implementation. Standard performance.

Algorithm Benchmarking

BetterFps includes a built-in benchmarking tool to help users find the best algorithm for their specific CPU. To use it, users can run the mod's .jar file directly outside of Minecraft. This opens a window that tests each algorithm and displays the time taken in milliseconds.

BetterFps algorithm benchmarking tool interface

Performance Features#

Beyond math optimizations, BetterFps introduces several specific fixes for common lag sources in Minecraft.

  • Memory Preallocation Removal: By default, Minecraft pre-allocates 10MB of RAM to prevent the game from crashing immediately on low-memory systems. BetterFps can disable this, freeing up that memory for actual game use, which is particularly beneficial for large modpacks.
  • Fog Removal: Rendering fog can be surprisingly taxing on the GPU. BetterFps provides a toggle to completely disable fog, which can provide a noticeable FPS boost in biomes like swamps or during rainy weather.
  • Fast Hopper: Hoppers in vanilla Minecraft are notorious for causing "TPS lag" because they constantly check for items to pick up even when they are full or blocked. BetterFps optimizes this logic, reducing the CPU load of large hopper arrays.
  • Fast Beacon: Optimizes the code responsible for beacon effects and beam rendering. It removes unnecessary calculations and simplifies the beam's transparency layers to reduce rendering overhead.
  • Faster Creative Search: In large modpacks with thousands of items, the Creative Mode search bar can cause the game to freeze. BetterFps implements a smart search algorithm that caches results and ignores non-character keys (like Shift), making the search instantaneous.

Configuration#

BetterFps is designed to be user-friendly, offering both an in-game GUI and a configuration file for advanced users.

In-Game Menu

Players can access the settings by navigating to Options -> BetterFps Options. In some versions, pressing the F12 key while in-game will also open the configuration screen. This menu allows for real-time toggling of all features, including the math algorithm, fog, and block optimizations.

Config File

For server administrators or modpack creators, the mod's settings are stored in config/betterfps.json.

Key Type Default Description
algorithm String rivens-half The math algorithm to use.
preallocateMemory Boolean false Whether to keep the 10MB RAM preallocation.
fog Boolean true Enables or disables fog rendering.
fastHopper Boolean true Enables hopper optimizations.
fastBeacon Boolean true Enables beacon optimizations.
creativeSearch Boolean true Enables the optimized creative search bar.

Compatibility#

BetterFps is built with compatibility in mind and works alongside most major optimization mods:

  • Optifine: Fully compatible. BetterFps will automatically override Optifine's "Fast Math" setting if a specific algorithm is selected in BetterFps.
  • Fastcraft: Fully compatible. Both mods can be used together to maximize performance on older hardware.
  • FpsPlus: BetterFps acts as a modern successor to FpsPlus and will override its sine/cosine improvements if both are installed.

Note: BetterFps is a "coremod" that performs bytecode manipulation. While it is generally stable, it may not appear in the standard Forge mod list in some versions due to how it loads into the game environment.