summaryrefslogtreecommitdiff
path: root/src/client/java/net/cshift
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-11-03 02:40:23 -0500
committerKyle Gunger <kgunger12@gmail.com>2024-11-03 02:40:23 -0500
commit8a6be0ce81d935551ab2ebc9c4e7d41b88297957 (patch)
treeed194dd70239f4a022d8ee824876cdbcd5c950c7 /src/client/java/net/cshift
parentf6ecfac78b963a694a13891df06413df104b19fb (diff)
Update to currentHEADmain
Diffstat (limited to 'src/client/java/net/cshift')
-rw-r--r--src/client/java/net/cshift/mc/sparkt/SparktClientInit.java31
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());
+ });
+ }
+}