From bef8c2da3dce51d4d384301a41164c611b02f5ef Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Thu, 3 Sep 2020 20:40:40 +0800 Subject: [PATCH] Fix crash caused by previous commit (#7298) --- src/main/java/net/minecraftforge/fml/ModLoadingStage.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/ModLoadingStage.java b/src/main/java/net/minecraftforge/fml/ModLoadingStage.java index 99ebb4fb1..d7782fa4c 100644 --- a/src/main/java/net/minecraftforge/fml/ModLoadingStage.java +++ b/src/main/java/net/minecraftforge/fml/ModLoadingStage.java @@ -50,8 +50,7 @@ public enum ModLoadingStage ERROR(), VALIDATE(), CONSTRUCT(FMLConstructModEvent.class), - @SuppressWarnings({ "unchecked", "rawtypes" }) //Eclipse compiler generics issue. Sorry cpw, your nested generics can't be inferred - CREATE_REGISTRIES((Supplier)()->Stream.of((Function)RegistryEvent.NewRegistry::new), EventDispatcher.identity()), + CREATE_REGISTRIES(()->Stream.of(EventGenerator.fromFunction(RegistryEvent.NewRegistry::new)), EventDispatcher.identity()), LOAD_REGISTRIES(GameData::generateRegistryEvents, GameData.buildRegistryEventDispatch()), COMMON_SETUP(FMLCommonSetupEvent.class), SIDED_SETUP(DistExecutor.unsafeRunForDist(()->()->FMLClientSetupEvent.class, ()->()->FMLDedicatedServerSetupEvent.class)),