跳到正文

Subtle Effects Threads Fix

作者:AidenWr3nch

Fixes the "Accessing LegacyRandomSource from multiple threads" crash caused by Subtle Effects biome particles on NeoForge 1.21.1.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

## Subtle Effects Thread Fix

**The definitive fix for the `Accessing LegacyRandomSource from multiple threads` crash caused by Subtle Effects on NeoForge 1.21.1.**

—

### The Problem

When using **Subtle Effects** together with modern optimization mods (Sodium, Flywheel, ScalableLux, ModernFix, etc.) or simply with a heavily loaded client + integrated server, the game can randomly crash with:

The stacktrace almost always points to:

`einstein.subtle_effects.ticking.biome_particles.BiomeParticleManager.tickBiomeParticles`

This happens because Minecraft’s `LegacyRandomSource` is **not thread-safe**, and Subtle Effects was accessing it from a context where multiple threads could touch it.

—

### The Solution

This mod applies two layers of protection:

1. **Primary fix**  
   Redirects `Level#getRandom()` / `Level#random()` calls inside `tickBiomeParticles` to a proper **thread-safe** `RandomSource` (ThreadLocal).

2. **Safety net**  
   If any `IllegalStateException` related to `LegacyRandomSource` still escapes, it is caught and that frame’s biome particle tick is simply skipped. The game continues running normally.

Result: **no more crashes**, while keeping biome particles working in the vast majority of cases.

—

### Features

– Soft (optional) dependency on Subtle Effects — does nothing if the mod is not present
– Client-side only
– Zero configuration
– Extremely lightweight
– Fully compatible with heavy optimization packs

—

### Installation

1. Install NeoForge 1.21.1
2. Install Subtle Effects
3. Install this mod
4. Launch the game

No configuration needed.

—

### Compatibility

– Minecraft: **1.21.1**
– Loader: **NeoForge**
– Soft dependency: **Subtle Effects**

—

### Credits

Made for the **Perfection Rework** visual stack.  
Inspired by the original Subtle Fix concept.

—

### License

MIT

常见问题

Subtle Effects Threads Fix 支持哪些 Minecraft 版本?

Subtle Effects Threads Fix 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Subtle Effects Threads Fix 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

AidenWr3nch 的其他作品

查看全部 →