From 8a6be0ce81d935551ab2ebc9c4e7d41b88297957 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 3 Nov 2024 02:40:23 -0500 Subject: Update to current --- .../net/cshift/mc/sparkt/SparktClientInit.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/client/java/net/cshift/mc/sparkt/SparktClientInit.java (limited to 'src/client/java/net/cshift') 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()); + }); + } +} -- cgit v1.2.3