本文整理汇总了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) {}
}
}
}
示例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"));
}
示例3: runtimeGuiCategories
import net.minecraftforge.fml.client.IModGuiFactory; //导入依赖的package包/类
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
示例4: getHandlerFor
import net.minecraftforge.fml.client.IModGuiFactory; //导入依赖的package包/类
@Override
public IModGuiFactory.RuntimeOptionGuiHandler getHandlerFor(IModGuiFactory.RuntimeOptionCategoryElement element)
{
return null;
}
示例5: runtimeGuiCategories
import net.minecraftforge.fml.client.IModGuiFactory; //导入依赖的package包/类
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
return Collections.emptySet();
}
示例6: runtimeGuiCategories
import net.minecraftforge.fml.client.IModGuiFactory; //导入依赖的package包/类
@Override
public Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
示例7: getHandlerFor
import net.minecraftforge.fml.client.IModGuiFactory; //导入依赖的package包/类
@Override
public IModGuiFactory.RuntimeOptionGuiHandler getHandlerFor(
IModGuiFactory.RuntimeOptionCategoryElement element) {
return null;
}