From bdb5a79f05dd370da00a8c244ba6f1c569f2b683 Mon Sep 17 00:00:00 2001 From: "Arthur (fuj1n) Uzulin" Date: Sun, 21 Mar 2021 18:16:47 +1100 Subject: [PATCH] Fixed setupWorldGeneration not being called --- .../tmechworks/common/MechworksContent.java | 1 + .../tmechworks/common/worldgen/MechworksWorld.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/slimeknights/tmechworks/common/MechworksContent.java b/src/main/java/slimeknights/tmechworks/common/MechworksContent.java index 98f7da6..8a6fd5b 100644 --- a/src/main/java/slimeknights/tmechworks/common/MechworksContent.java +++ b/src/main/java/slimeknights/tmechworks/common/MechworksContent.java @@ -115,6 +115,7 @@ public void preInit(FMLCommonSetupEvent event) { } public void init(InterModEnqueueEvent event) { + MechworksWorld.getInstance().setupWorldGeneration(); } public void postInit(InterModProcessEvent event) { diff --git a/src/main/java/slimeknights/tmechworks/common/worldgen/MechworksWorld.java b/src/main/java/slimeknights/tmechworks/common/worldgen/MechworksWorld.java index ac8389e..1206958 100644 --- a/src/main/java/slimeknights/tmechworks/common/worldgen/MechworksWorld.java +++ b/src/main/java/slimeknights/tmechworks/common/worldgen/MechworksWorld.java @@ -23,6 +23,8 @@ import java.util.function.Supplier; public class MechworksWorld { + private static MechworksWorld INSTANCE; + private static final Logger log = LogManager.getLogger(TMechworks.modId + ".world"); private static final List OVERWORLD_ORES = ImmutableList.of( @@ -30,6 +32,14 @@ public class MechworksWorld { new OreProperties(() -> MechworksContent.Blocks.aluminum_ore.get().getDefaultState(), 8, ore -> ore.range(64).square().func_242731_b(20), MechworksConfig.COMMON_CONFIG.worldGen.aluminum) ); + public MechworksWorld() { + INSTANCE = this; + } + + public static MechworksWorld getInstance() { + return INSTANCE; + } + public void setupWorldGeneration() { Registry> registry = WorldGenRegistries.CONFIGURED_FEATURE;