Jump to content

Trouble with registering Menu Screen


Armok

Recommended Posts

I'm trying to add GUI to custom workbench. At first i've tryed to register Screen in mode constructor, now i'm trying to do it in another class:

@Mod.EventBusSubscriber public class ClientEventSubscriber { @SubscribeEvent public void clientSetup(FMLClientSetupEvent event) { event.enqueueWork( () -> MenuScreens.register(mage_workbench_menu.get(), MageWorkbenchScreen::new) ); } }

@Mod.EventBusSubscriber
public class ClientEventSubscriber {
    @SubscribeEvent
    public void clientSetup(FMLClientSetupEvent event)  {
        event.enqueueWork(
                () -> MenuScreens.register(mage_workbench_menu.get(), MageWorkbenchScreen::new)
        );
    }
}

Help me please.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.