Skip to content

Lithium breaks a NeoForge patch preventing a loading deadlock caused by ServerChunkCache::getChunk #667

@Fuzss

Description

@Fuzss

Minecraft: 1.21.8
NeoForge: 21.8.4-beta
Lithium: 0.18.0+mc1.21.8

latest.log

The Neo patch and the reasons for it is outlined here:
MinecraftForge/MinecraftForge#7697
neoforged/NeoForge#99
neoforged/NeoForge#110

To reproduce I have a mod that allows mobs (like illagers and drowneds) to spawn with equipment, which is applied during EntityJoinLevelEvent.

Without Lithium this works fine, with Lithium installed it is very easy to get a deadlock.

Steps for reproducing:

  • Install the following mods: Lithium, Puzzles Lib, Armored Foes
  • Create a world using the following seed: -6902519934141284895
  • Run this command: /tp @s -880 ~ -1568
  • Fly out in the ocean a bit, you will notice chunks stop generating and upon trying to leave the world via the pause screen Saving world will show forever. The log does not give any hint at this.

The problem is this Mixin: https://github.com/CaffeineMC/lithium/blob/develop/common/src/main/java/net/caffeinemc/mods/lithium/mixin/world/chunk_access/ServerChunkCacheMixin.java

Also on another note I've added the patch to Fabric, but due to your Mixin it is broken (this is the same implementation used in Armor Foes, the source of which is not public yet).
So far my only option is to set mixin.world.chunk_access=false which is of course not ideal.

Honestly this is such a serious and hard to debug issue that it would be great in addition to fixing the Neo patch to also implement it on Fabric in Lithium itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions