diff --git a/src/main/java/org/samo_lego/fabrictailor/FabricTailor.java b/src/main/java/org/samo_lego/fabrictailor/FabricTailor.java index 74e0a31..a1687d5 100644 --- a/src/main/java/org/samo_lego/fabrictailor/FabricTailor.java +++ b/src/main/java/org/samo_lego/fabrictailor/FabricTailor.java @@ -16,6 +16,7 @@ import org.samo_lego.fabrictailor.config.TailorConfig; import org.samo_lego.fabrictailor.network.NetworkHandler; import org.samo_lego.fabrictailor.network.payload.DefaultSkinPayload; +import org.samo_lego.fabrictailor.network.payload.FabricTailorHelloPayload; import org.samo_lego.fabrictailor.network.payload.HDSkinPayload; import org.samo_lego.fabrictailor.network.payload.VanillaSkinPayload; @@ -56,6 +57,8 @@ public void onInitialize() { ServerConfigurationConnectionEvents.CONFIGURE.register(NetworkHandler::onConfigured); + PayloadTypeRegistry.configurationS2C().register(FabricTailorHelloPayload.TYPE, FabricTailorHelloPayload.CODEC); + PayloadTypeRegistry.playC2S().register(VanillaSkinPayload.TYPE, VanillaSkinPayload.CODEC); ServerPlayNetworking.registerGlobalReceiver(VanillaSkinPayload.TYPE, NetworkHandler::changeVanillaSkinPacket); diff --git a/src/main/java/org/samo_lego/fabrictailor/client/ClientTailor.java b/src/main/java/org/samo_lego/fabrictailor/client/ClientTailor.java index ff981de..9f8692e 100644 --- a/src/main/java/org/samo_lego/fabrictailor/client/ClientTailor.java +++ b/src/main/java/org/samo_lego/fabrictailor/client/ClientTailor.java @@ -8,7 +8,6 @@ import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking; import net.fabricmc.fabric.api.client.networking.v1.ClientLoginConnectionEvents; -import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; import net.minecraft.ChatFormatting; import net.minecraft.client.KeyMapping; import org.lwjgl.glfw.GLFW; @@ -62,7 +61,6 @@ public void onInitializeClient() { forceOpen = false; }); - PayloadTypeRegistry.configurationS2C().register(FabricTailorHelloPayload.TYPE, FabricTailorHelloPayload.CODEC); ClientConfigurationNetworking.registerGlobalReceiver(FabricTailorHelloPayload.TYPE, (payload, context) -> { TAILORED_SERVER = true; ALLOW_DEFAULT_SKIN = payload.allowSkinButton();