Fabric API's sendable channel sync randomly not working
qouteall opened this issue ยท 3 comments
The latest version of ImmPtl added the code of rejecting vanilla clients using Fabric API functionality
(following the doc of https://fabricmc.net/2023/09/12/1202.html)
Someone reported that it will wrongly recognize the client as not having ImmPtl when entering singleplayer world, when using bad packets mod, thus disconnecting the client. As I tested, this issue occurs randomly.
Are there any specific mod versions that I can look at, or does it happen on latest version?
Can only reproduce it once, and that's when I didn't place a breakpoint :/.
Looks like Bad Packets' sync task is called first somehow even though Fabric API's mixin has higher priority? Even then the synced channel ids should still be there by the time the event callback is called.
Are there any specific mod versions that I can look at, or does it happen on latest version?
The latest version of ImmPtl.
Fabric API testmod has similar things https://github.com/FabricMC/fabric/blob/1.20.2/fabric-networking-api-v1/src/testmod/java/net/fabricmc/fabric/test/networking/configuration/NetworkingConfigurationTest.java#L42
The randomness may be caused by multithreading. I guess that bad packets packet handling happens concurrently with Fabric API's (not sure). Breakpoint may interfere with it by slowing down some code.