Home›Java›Mods›Accelerated Recoiling
Accelerated Recoiling
ModsJava

Accelerated Recoiling

Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.

by wiyuka · on CurseForge

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.11 · NeoForge⬇ Download for 1.21.10 · NeoForge⬇ Download for 1.21.8 · NeoForge⬇ Download for 1.21.1 · NeoForge⬇ Download for 1.20.1 · NeoForge⬇ Download for 1.21.11 · Fabric⬇ Download for 1.21.10 · Fabric⬇ Download for 1.21.1 · Fabric⬇ Download for 1.20.1 · Fabric⬇ Download for 1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Accelerated Recoiling

Accelerated Recoiling is a mod focused on optimizing server-side entity collision logic. It utilizes the Java 21+ FFM (Foreign Function & Memory) API to take over entity AABB collision detection, offloading highly intensive computational workloads to a native C++ library, thereby significantly improving server performance.

This mod is currently experimental, and the entity cramming behavior is not entirely identical to vanilla. Please be sure to use it with caution and back up your saves beforehand.

Official QQ Group: 1023713677

Requirements & Dependencies

Installation & Configuration

Upon the first launch, the mod will automatically extract the native library files to the root directory and generate the acceleratedRecoiling.json configuration file.

Default Configuration & Explanations:

{
   "enableEntityCollision": true,      // Whether to enable entity cramming optimization
   "enableEntityGetterOptimization": true, // Enable EntityGetter interface optimization (currently ineffective)
   "maxCollision": 32,                 // Maximum number of collision interactions per entity
   "gridSize": 1,                      // Algorithm grid size
   "densityWindow": 4,                 // Density smoothing window
   "densityThreshold": 16              // Density threshold of surrounding entities to trigger accelerated recoiling
}

Note: If performance decreases instead of improving after enabling the mod, please try lowering the densityThreshold.

FAQ (Q&A)

Q: Why does the game crash or fail to launch? A: Please troubleshoot using the following steps:

  1. Ensure Java 21+ and the MSVC Redistributable are correctly installed.
  2. If your client is NeoForge 1.21.1/1.21.8, try launching the game with Java 22+.
  3. If using a Leaves server, ensure your launch arguments include -Dleavesclip.enable.mixin=true.
  4. If you recently updated the mod, try deleting acceleratedRecoilingLib.dll and acceleratedRecoiling.json in the root directory or your .minecraft folder, then restart the game to let them regenerate.

Q: Is the entity cramming behavior identical to vanilla? A: Not completely. This mod is currently experimental and alters the underlying calculation logic, so the cramming behavior will differ from vanilla. Please make sure to back up your saves before using.

Q: Will it affect Technical Minecraft (TMC) mechanics? A: It is currently unknown. It might affect Redstone contraptions/farms that rely on entity cramming. Please make sure to back up your saves before using.

Q: Why did server performance drop after enabling the mod? A: It is possible that the density of surrounding entities hasn't reached the threshold to trigger the optimization, causing the game to run both the vanilla and accelerated recoiling calculation paths simultaneously. Please open the config file and try appropriately lowering the densityThreshold value.

Performance Benchmarks

Test Environment: i5-12600KF | 32GB RAM | RTX 3060 Ti | Leaves 1.21.8 | GraalVM JDK 21

Test 1: TPS Changes (Spawning entities within a 2x2 space in the same chunk)

Entity Count Leaves + Accelerated Recoiling Vanilla Leaves Performance Boost
2,048 20.0 TPS (16 MSPT) 3.0 TPS 20.8x
4,096 20.0 TPS (27 MSPT) 0.5 TPS 74x
16,384 8.6 TPS (115 MSPT) - -
32,768 4.3 TPS (230 MSPT) - -

Test 2: BroadPhase Execution Time (Pure C++ side performance)

Entity Count MS / Frame Equivalent FPS
10,000 0.2 ms 5000
50,000 1.1 ms 909
100,000 2.5 ms 400
400,000 21.3 ms 46

To-Do List (TODO)

Building from Source

The project uses Gradle to invoke MSVC and WSL for cross-platform compilation (generating .dll and .so). It is recommended to operate in a Windows 10/11 environment with WSL installed.

1. Environment Preparation

2. Modify Script Path Open build.gradle.kts, find the compileNativeLib task, and replace the value of the vcvarsScript variable with the actual path to vcvars64.bat on your local machine.

3. Build Run the following commands in the project's root directory:

gradlew jar
gradlew build

The compiled artifacts (Jars containing the dynamic libraries for both platforms) will be generated in the build/libs/ directory.

Credits & License

This project is open-sourced under the MIT License. Special thanks to the following developers for their tremendous help with the core concepts and code porting of this project:

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more