diff --git a/build.gradle b/build.gradle index 254dc6f..82366fa 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ runs { } data { - programArguments.addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/'), '--existing', file('src/generated/resources/').getAbsolutePath() + programArguments.addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing', file('src/generated/resources/').getAbsolutePath() } } diff --git a/src/generated/resources/.cache/0f202e000d40347127b33b6edbbb29689b8cbf86 b/src/generated/resources/.cache/0f202e000d40347127b33b6edbbb29689b8cbf86 index 7f9fc60..b1b2bae 100644 --- a/src/generated/resources/.cache/0f202e000d40347127b33b6edbbb29689b8cbf86 +++ b/src/generated/resources/.cache/0f202e000d40347127b33b6edbbb29689b8cbf86 @@ -1,2 +1,2 @@ -// 1.20.1 2023-08-22T18:52:58.2097967 Pack Metadata -dd3c60fd02429ac402f8102d597a833e5a37450f pack.mcmeta +// 1.20.2 2024-01-20T01:02:56.2526951 Pack Metadata +61c7f3da7fb8c1a0151b861036884160c7bccf5a pack.mcmeta diff --git a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 index 8c472d7..bce8dff 100644 --- a/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 +++ b/src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 @@ -1,2 +1,2 @@ -// 1.20.1 2023-08-22T18:52:58.1947962 Languages: en_us +// 1.20.2 2024-01-20T01:00:14.5929562 Languages: en_us 0cb2af7dbbd8bd2ff78b335c92a753a3048b1730 assets/cumulus_menus/lang/en_us.json diff --git a/src/generated/resources/pack.mcmeta b/src/generated/resources/pack.mcmeta index 3143bae..6f48574 100644 --- a/src/generated/resources/pack.mcmeta +++ b/src/generated/resources/pack.mcmeta @@ -3,6 +3,11 @@ "description": { "translate": "pack.cumulus_menus.mod.description" }, - "pack_format": 15 + "neoforge": { + "versions": { + "server_data": 18 + } + }, + "pack_format": 18 } } \ No newline at end of file diff --git a/src/main/java/com/aetherteam/cumulus/Cumulus.java b/src/main/java/com/aetherteam/cumulus/Cumulus.java index 0bca995..c21c2d9 100644 --- a/src/main/java/com/aetherteam/cumulus/Cumulus.java +++ b/src/main/java/com/aetherteam/cumulus/Cumulus.java @@ -19,8 +19,6 @@ import net.neoforged.fml.ModLoadingContext; import net.neoforged.fml.common.Mod; import net.neoforged.fml.config.ModConfig; -import net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext; -import net.neoforged.fml.loading.FMLEnvironment; import net.neoforged.neoforge.data.event.GatherDataEvent; import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.NewRegistryEvent; @@ -37,19 +35,18 @@ public class Cumulus { public static final ResourceKey> MENU_REGISTRY_KEY = ResourceKey.createRegistryKey(new ResourceLocation(Cumulus.MODID, "menu")); public static final Registry MENU_REGISTRY = new RegistryBuilder<>(MENU_REGISTRY_KEY).sync(true).create(); - public Cumulus() { - if (FMLEnvironment.dist == Dist.CLIENT) { - IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); - modEventBus.addListener(NewRegistryEvent.class, event -> event.register(MENU_REGISTRY)); + public Cumulus(IEventBus bus, Dist dist) { + if (dist == Dist.CLIENT) { + bus.addListener(NewRegistryEvent.class, event -> event.register(MENU_REGISTRY)); - modEventBus.addListener(this::dataSetup); + bus.addListener(this::dataSetup); DeferredRegister[] registers = { Menus.MENUS, }; for (DeferredRegister register : registers) { - register.register(modEventBus); + register.register(bus); } ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CumulusConfig.CLIENT_SPEC);