当前位置: 首页>>代码示例>>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;未经允许,请勿转载。