跳到正文

Let-s-do-bugs-fix

作者:Dreamdawn

Fixes bugs for the Let's Do series of mods on Forge 1.20.1 and Neoforge 1.21.1

收藏

介绍

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

[Let’s Do] Crash Fix

A standalone patch‑only Forge 1.20.1 and Neoforge 1.21.1 mod containing three categories of fixes:

  1. Startup crash caused by multiple [Let’s Do] mods (Meadow, BloomingNature, Vinery, etc.) writing concurrently to vanilla FireBlock flammable block tables during the parallel‑phase FMLCommonSetupEvent: java.lang.ArrayIndexOutOfBoundsException: Index 1024 out of bounds for length 513

  2. Create’s Schematicannon crashes when loading schematics containing [Let’s Do] block entities (such as StorageBlockEntity): java.lang.ClassCastException: SchematicLevel cannot be cast to ServerLevel

  3. Farmer’s Delight Rich Soil Farmland fails to recognize the Farm & Charm Water Sprinkler as a water source. As a result, rich soil cannot stay moist near sprinklers and degrades back into ordinary dirt.

Note: Neoforge 1.21.1 has official fixes for issues #1 and #3 above

Mechanism

Vanilla FireBlock stores block flammability chances inside two non‑thread‑safe fastutil hash tables. Multiple Let’s Do mods independently call FireBlock.registerFlammable (SRG name m_53444_) concurrently from their own FlammableBlockRegistry.init(). When both tables are rehashed and modified at the same time, their key‑value array lengths fall out‑of‑sync and trigger an out‑of‑bounds crash.

Vinery’s StorageBlockEntity.setChanged() forcibly casts its level to ServerLevel. Create’s blueprint system uses a dummy SchematicLevel fake world; this hard cast throws an exception and prevents blueprint loading.

Farmer’s Delight’s RichSoilFarmlandBlock.isNearWater() only checks for vanilla water blocks. The Farm & Charm water_sprinkler block should count as a valid water source but is ignored, causing nearby rich soil to degrade.

This mod applies vanilla‑targeted Mixins to:

  • Wrap both Object2IntMap.put calls inside FireBlock.m_53444_ behind a global lock, serializing all flammability registration writes;
  • Skip execution of setChanged() for a total of 13 block‑entity classes from Vinery / Meadow / BloomingNature / Brewery / Farm & Charm / Bakery / doapi whenever the entity resides inside a fake world that is not a ServerLevel;
  • Inject an extra water‑source check into Farmer's Delight‘s RichSoilFarmlandBlock.isNearWater(), so the Farm & Charm water_sprinkler block is treated as valid water.

No files from original mods are modified, and no game save data is altered.

Usage

Place dist/letsdo‑crashfix‑1.0.3‑mc1.20.1‑forge.jar into your mods folder (no additional dependency mods required).

The patch is active once you see this line in your startup log: [Let's Do] Crash Fix: flammable registration is now serialized via FireBlock mixin.

常见问题

Let-s-do-bugs-fix 支持哪些 Minecraft 版本?

Let-s-do-bugs-fix 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

Let-s-do-bugs-fix 怎么安装?

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

评论

登录后评论和评分