JheffersonMarques / MorePeripherals

Adds new peripherals for CC:Tweaked
MIT License
8 stars 2 forks source link

Potential threading issues #15

Closed Nessiesson closed 1 year ago

Nessiesson commented 1 year ago

Hello! Earlier today I was having a great time playing on a server when I noticed that redstone was…broken. Some prodding of a server admin later revealed some strange errors in the console courtesy of the Unsafe World Random Access Detector mod.

One likely culprit is that the @LuaFunction annotated methods in the mod are missing the mainThread = true parameter which appears to be intended for use in any method that interacts with the main MC thread.

Note: Using MorePeripherals_1.19.2-1.8.1.jar and cc-tweaked-1.19.2-1.101.2.jar though I am not sure it matters, and replicating my exact redstone issue may be hard given the nature of threading.

JheffersonMarques commented 1 year ago

Gonna look into that, it seems that my lack of experience when i wrote the peripherals originally is coming back to haunt me

Thank you for reporting the Issue!

JheffersonMarques commented 1 year ago

I've changed the code a bit (now most of the stuff is on main thread), i think it should fix it

Nessiesson commented 1 year ago

Thank you! :D