From ddc3b2e5f57153b3a62241a40abb4cf34b99c7e5 Mon Sep 17 00:00:00 2001 From: boybook Date: Sat, 16 Mar 2024 20:52:05 +0800 Subject: [PATCH] Fix bug: only load geometry in client environment. --- .../bedrockloader/loader/BedrockResourcePackLoader.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/net/easecation/bedrockloader/loader/BedrockResourcePackLoader.kt b/src/main/kotlin/net/easecation/bedrockloader/loader/BedrockResourcePackLoader.kt index 1838ecc..30fa45c 100644 --- a/src/main/kotlin/net/easecation/bedrockloader/loader/BedrockResourcePackLoader.kt +++ b/src/main/kotlin/net/easecation/bedrockloader/loader/BedrockResourcePackLoader.kt @@ -39,8 +39,10 @@ class BedrockResourcePackLoader( val env = FabricLoader.getInstance().environmentType this.init() // Geometry - context.resource.geometries.forEach { (key, value) -> - BedrockAddonsRegistry.models[key] = BedrockGeometryModel(value) + if (env == EnvType.CLIENT) { + context.resource.geometries.forEach { (key, value) -> + BedrockAddonsRegistry.models[key] = BedrockGeometryModel(value) + } } // Blocks for (block in context.resource.blocks) {