From 652dd905996f523338d9b94d3662f5f2abb49b35 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Fri, 12 Jul 2024 08:57:28 +0200 Subject: [PATCH] Fix SMP issues --- gradle.properties | 2 +- .../api/evaluate/variable/ValueDeseralizationContext.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0e87679c384..ce2514cbdff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ mod_id=integrateddynamics mod_version=1.21.4 minecraft_version=1.21 -neoforge_version=21.0.43-beta +neoforge_version=21.0.86-beta cyclopscore_version=1.19.1-462 integrateddynamicscompat_version=1.0.0-63 release_type=release diff --git a/src/main/java/org/cyclops/integrateddynamics/api/evaluate/variable/ValueDeseralizationContext.java b/src/main/java/org/cyclops/integrateddynamics/api/evaluate/variable/ValueDeseralizationContext.java index 7117e8d6172..f1bc463318a 100644 --- a/src/main/java/org/cyclops/integrateddynamics/api/evaluate/variable/ValueDeseralizationContext.java +++ b/src/main/java/org/cyclops/integrateddynamics/api/evaluate/variable/ValueDeseralizationContext.java @@ -6,6 +6,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.neoforge.server.ServerLifecycleHooks; +import org.cyclops.cyclopscore.helper.MinecraftHelpers; /** @@ -29,6 +30,9 @@ public static ValueDeseralizationContext ofClient() { } public static ValueDeseralizationContext ofAllEnabled() { + if (MinecraftHelpers.isClientSide()) { + return ofClient(); + } return new ValueDeseralizationContext(ServerLifecycleHooks.getCurrentServer().registryAccess()); } }