Update:
https://www.replaymod.com/forum/thread/2946
It seems like it might be a problem with the version of FabricAPI you use, I changed from 0.4.2 to 0.4.1 as one person in the other forum said to and it fixed the issue. If you hadn't sorted the issue out yet, I hope this helps!