mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-05 09:36:19 +00:00
30dc4cb38c
Historically we used Forge's SimpleChannel methods (and PacketDistributor) to send the packets to the client. However, we don't need to do that - it is sufficient to convert it to a vanilla packet, and send the packet ourselves. Given we need to do this on Fabric, it makes sense to do this on Forge as well. This allows us to unify (and thus simplify) a lot of how packet sending works. At the same time, we also remove the handling of speaker audio during decoding. We originally did this to avoid the additional copy of audio data. However, this doesn't work on 1.20.4 (as packets aren't encoded/decoded on singleplayer), so it makes sense to do this Correctly(TM). This also allows us to get rid of ClientNetworkContext.get(). We do still need to service load this class (as Forge's networking isn't split up in the same way Fabric's is), but we'll be able to drop that in 1.20.4. Finally, we move the record playing code from ClientNetworkContext to ClientPlatformHelper. This means the network context no longer needs to be platform-specific! |
||
---|---|---|
.. | ||
common | ||
common-api | ||
core | ||
core-api | ||
fabric | ||
fabric-api | ||
forge | ||
forge-api | ||
lints | ||
standalone | ||
web | ||
ARCHITECTURE.md |