當前位置: 首頁>>代碼示例>>Java>>正文


Java IModGuiFactory類代碼示例

本文整理匯總了Java中net.minecraftforge.fml.client.IModGuiFactory的典型用法代碼示例。如果您正苦於以下問題:Java IModGuiFactory類的具體用法?Java IModGuiFactory怎麽用?Java IModGuiFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IModGuiFactory類屬於net.minecraftforge.fml.client包,在下文中一共展示了IModGuiFactory類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onButtonClickPost

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@SubscribeEvent
public void onButtonClickPost(GuiScreenEvent.ActionPerformedEvent.Post event) {
    if (event.getGui() instanceof GuiOptions) {
        if (event.getButton().id == 1725) {
            try {
                IModGuiFactory guiFactory = FMLClientHandler.instance().getGuiFactoryFor(Loader.instance().getIndexedModList().get(Reference.MOD_ID));
                GuiScreen newScreen = guiFactory.mainConfigGuiClass().getConstructor(GuiScreen.class).newInstance(event.getGui());
                event.getGui().mc.displayGuiScreen(newScreen);
            } catch (Exception ex) {}
        }
    }
}
 
開發者ID:FireBall1725,項目名稱:TwitchNotifier,代碼行數:13,代碼來源:GuiEvents.java

示例2: actionPerformed

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
protected void actionPerformed(GuiButton b) throws IOException
{

    // Exiting gui
    if (b.id == -1)
        mc.displayGuiScreen(null);

    // Showing guilds in
    else if (b.id == 0)
        mc.displayGuiScreen(new GuiServers(this));

    // Showing relationships
    else if (b.id == 1)
        mc.displayGuiScreen(new GuiFriends(this));

    // Showing instance
    else if (b.id == 2)
    {
        ModContainer container = Loader.instance().getIndexedModList().get("dce");
        try {
            IModGuiFactory e1 = FMLClientHandler.instance().getGuiFactoryFor(container);
            GuiScreen newScreen1 = e1
                    .mainConfigGuiClass()
                    .getConstructor(new Class[]{GuiScreen.class})
                    .newInstance(this);
            this.mc.displayGuiScreen(newScreen1);
        } catch (Exception var5) {
            FMLLog.log(Level.ERROR, var5, "There was a critical issue trying to build the instance GUI for %s",
                    container.getModId());
        }
    }

    // Showing user list
    else if (b.id == 3)
        mc.displayGuiScreen(new GuiUsers(this));

    // Report issue
    else if (b.id == 5)
        Desktop.getDesktop().browse(URI.create("https://github.com/duke605/DiscordCE/issues"));

    // Go to github
    else if (b.id == 6)
        Desktop.getDesktop().browse(URI.create("https://github.com/duke605/DiscordCE"));
}
 
開發者ID:duke605,項目名稱:DiscordCE,代碼行數:46,代碼來源:GuiDiscordCeMenu.java

示例3: runtimeGuiCategories

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
    return null;
}
 
開發者ID:Tbsc,項目名稱:TbscFPS,代碼行數:5,代碼來源:TFModGuiFactory.java

示例4: getHandlerFor

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
public IModGuiFactory.RuntimeOptionGuiHandler getHandlerFor(IModGuiFactory.RuntimeOptionCategoryElement element)
{
    return null;
}
 
開發者ID:DoubleDoorDevelopment,項目名稱:ItemBlacklist,代碼行數:6,代碼來源:ModConfigGuiFactory.java

示例5: runtimeGuiCategories

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
    return Collections.emptySet();
}
 
開發者ID:AgriCraft,項目名稱:AgriCraft,代碼行數:5,代碼來源:GuiFactory.java

示例6: runtimeGuiCategories

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
	return null;
}
 
開發者ID:therealfarfetchd,項目名稱:IngameAccountSwitcher,代碼行數:5,代碼來源:VersionChecker.java

示例7: getHandlerFor

import net.minecraftforge.fml.client.IModGuiFactory; //導入依賴的package包/類
@Override
public IModGuiFactory.RuntimeOptionGuiHandler getHandlerFor(
		IModGuiFactory.RuntimeOptionCategoryElement element) {
	return null;
}
 
開發者ID:therealfarfetchd,項目名稱:IngameAccountSwitcher,代碼行數:6,代碼來源:VersionChecker.java


注:本文中的net.minecraftforge.fml.client.IModGuiFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。