BackSlot incompatibility
Mirsario opened this issue ยท 2 comments
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
- Load MC with
C2ME
,BackSlot
,(Quilted)Fabric API
,Cloth Config
- Grab some sword and press BackSlot's hotkey (
G
by default) a bunch of times to put the sword on and from your back. - The world crashes. Takes around 3 presses for me.
Expected behavior
No crashes, duh.
Runtime info:
- OS: Windows 10,
x86_64
- Minecraft version:
1.19.2
, Quilt Loader0.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.
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.
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.