diff options
Diffstat (limited to 'src/client')
-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()); + }); + } +} |