Concurrent Chunk Management Engine (Fabric)

Concurrent Chunk Management Engine (Fabric)

231k Downloads

BackSlot incompatibility

Mirsario opened this issue ยท 2 comments

commented

Describe the bug
No idea which side will have to fix this, but loading the mod together with BackSlot and using the latter's features results in the world crashing thanks to CheckedThreadLocalRandom and a call of Random.nextFloat().

The relevant code of BackSlot doesn't seem to be doing anything special:
https://github.com/Globox1997/BackSlot/blob/1.19/src/main/java/net/backslot/network/SwitchPacket.java?ts=4#L168

Could thread locks (or whatever they're called in Java) be added for random instead of throwing exceptions when it's accessed from the "wrong" thread? Might be slow of course.

To Reproduce

  1. Load MC with C2ME, BackSlot, (Quilted)Fabric API, Cloth Config
  2. Grab some sword and press BackSlot's hotkey (G by default) a bunch of times to put the sword on and from your back.
  3. The world crashes. Takes around 3 presses for me.

Expected behavior
No crashes, duh.

Screenshots
image

Runtime info:

  • OS: Windows 10, x86_64
  • Minecraft version: 1.19.2, Quilt Loader 0.17.3
  • Mod version: 0.2.0+alpha.8.37 devbuild for 1.19.2

Crash reports / logs

Other mods

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.
commented

Using world random on another thread is absolutely wrong and causes weird crashes in vanilla: java.lang.IllegalStateException: Accessing LegacyRandomSource from multiple threads. This should be fixed on their side.

commented

Resolved now. Thanks, @Mephodio! I tried to resolve this myself at first, but that one maven repo going down was a problem. Reached out to its owners weeks ago, but nothing got fixed after promises.