From b20359808ae6a96210a37db332a56e4004b5d1f5 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Fri, 20 Nov 2020 22:40:30 +0100 Subject: [PATCH] Unstable stabilizers - Fixed clients getting forcibly disconnected due to uninitialized contraption data serialization --- src/main/java/com/simibubi/create/Create.java | 2 ++ .../create/foundation/entity/CreateDataSerializers.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 26e6eb038..d1d6333b4 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -24,6 +24,7 @@ import com.simibubi.create.foundation.data.LangMerger; import com.simibubi.create.foundation.data.recipe.MechanicalCraftingRecipeGen; import com.simibubi.create.foundation.data.recipe.ProcessingRecipeGen; import com.simibubi.create.foundation.data.recipe.StandardRecipeGen; +import com.simibubi.create.foundation.entity.CreateDataSerializers; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.worldgen.AllWorldFeatures; import com.tterrag.registrate.util.NonNullLazyValue; @@ -92,6 +93,7 @@ public class Create { modEventBus.addListener(EventPriority.LOWEST, this::gatherData); AllConfigs.register(); + CreateDataSerializers.register(); random = new Random(); DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus)); diff --git a/src/main/java/com/simibubi/create/foundation/entity/CreateDataSerializers.java b/src/main/java/com/simibubi/create/foundation/entity/CreateDataSerializers.java index 46defb307..c45d806d3 100644 --- a/src/main/java/com/simibubi/create/foundation/entity/CreateDataSerializers.java +++ b/src/main/java/com/simibubi/create/foundation/entity/CreateDataSerializers.java @@ -30,5 +30,7 @@ public class CreateDataSerializers { static { DataSerializers.registerSerializer(OPTIONAL_DIRECTION); } - + + public static void register() {} + }