From 8e923ab04c3953f120b4842b9f8e242ea9910c70 Mon Sep 17 00:00:00 2001 From: sticky Date: Wed, 6 Nov 2024 19:43:06 +0100 Subject: [PATCH] works on fabric --- .../java/net/createcobblestone/data/GeneratorTypeLoader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/main/java/net/createcobblestone/data/GeneratorTypeLoader.java b/common/src/main/java/net/createcobblestone/data/GeneratorTypeLoader.java index f2b5b84..c8b40e4 100644 --- a/common/src/main/java/net/createcobblestone/data/GeneratorTypeLoader.java +++ b/common/src/main/java/net/createcobblestone/data/GeneratorTypeLoader.java @@ -5,6 +5,7 @@ import com.jozufozu.flywheel.util.Pair; import dev.architectury.injectables.annotations.ExpectPlatform; import dev.architectury.networking.NetworkManager; +import dev.architectury.platform.Platform; import dev.architectury.utils.Env; import io.netty.buffer.Unpooled; import net.createcobblestone.CreateCobblestoneMod; @@ -71,6 +72,10 @@ public static void loadGeneratorTypes(ResourceManager resourceManager) { loadedTypes.add(new Quintet<>(id.toString(), block, generatorStress, generatorRatio, generatorStorage)); + if (Platform.getEnvironment() == Env.SERVER) { + GeneratorType.initializeNewType(id.toString(), new ResourceLocation(block), generatorStress, generatorRatio, generatorStorage); + } + } catch (IOException e) { LOGGER.error("Error loading generator type: " + id, e); }