diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-11-03 02:40:23 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-11-03 02:40:23 -0500 |
commit | 8a6be0ce81d935551ab2ebc9c4e7d41b88297957 (patch) | |
tree | ed194dd70239f4a022d8ee824876cdbcd5c950c7 /src/client/java/net/cshift | |
parent | f6ecfac78b963a694a13891df06413df104b19fb (diff) |
Diffstat (limited to 'src/client/java/net/cshift')
-rw-r--r-- | src/client/java/net/cshift/mc/sparkt/SparktClientInit.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/client/java/net/cshift/mc/sparkt/SparktClientInit.java b/src/client/java/net/cshift/mc/sparkt/SparktClientInit.java new file mode 100644 index 0000000..deedebb --- /dev/null +++ b/src/client/java/net/cshift/mc/sparkt/SparktClientInit.java @@ -0,0 +1,31 @@ +package net.cshift.mc.sparkt; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import net.cshift.mc.sparkt.netcode.payload.DeliveryPayload; +import net.cshift.mc.sparkt.netcode.payload.ProgressPayload; +import net.cshift.mc.sparkt.netcode.payload.TransitPayload; +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; + +public class SparktClientInit implements ClientModInitializer { + + public static final Logger LOG = LogManager.getFormatterLogger("Sparkt/Client/Init"); + + @Override + public void onInitializeClient() { + LOG.info("Closely watching to see the warm glow"); + ClientPlayNetworking.registerGlobalReceiver(DeliveryPayload.ID, (payload, context) -> { + LOG.info("Got some weird delivery packet! " + payload.uuid()); + }); + + ClientPlayNetworking.registerGlobalReceiver(ProgressPayload.ID, (payload, context) -> { + LOG.info("Got some weird progress packet! " + payload.map()); + }); + + ClientPlayNetworking.registerGlobalReceiver(TransitPayload.ID, (payload, context) -> { + LOG.info("Got some weird transit packet!" + payload.uuid()); + }); + } +} |