architectury / architectury-api

An intermediary api aimed at easing development of multiplatform mods.
https://discord.architectury.dev/
GNU Lesser General Public License v3.0
306 stars 55 forks source link

[1.20.5] C2S Packet Registration Crashes Fabric Dedicated Servers #496

Closed hammy275 closed 2 months ago

hammy275 commented 2 months ago

On Minecraft 1.20.5 Fabric, registering a C2S packet using Architectury API crashes the dedicated server, as it attempts to import the Minecraft class during registration. This happens in both dev and prod.

This can be reproduced by running the dedicated Fabric server on Architectury API's test mod, though it also happens with an implementation I wrote if you need a second reproduction.

In case it's relevant, I'm using Eclipse Termurin 21.0.3 as my JDK.

hammy275 commented 2 months ago

May be doing something wrong, but it seems this issue also occurs with S2C packets. This repo provides a minimal reproduction, along with a build.