本文整理匯總了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;
}