当前位置: 首页>>代码示例>>Java>>正文


Java GuiErrorScreen类代码示例

本文整理汇总了Java中net.minecraft.client.gui.GuiErrorScreen的典型用法代码示例。如果您正苦于以下问题:Java GuiErrorScreen类的具体用法?Java GuiErrorScreen怎么用?Java GuiErrorScreen使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GuiErrorScreen类属于net.minecraft.client.gui包,在下文中一共展示了GuiErrorScreen类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawScreen

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
public void drawScreen(final GuiErrorScreen errorScreen, final FontRenderer fontRenderer, final int mouseRelX, final int mouseRelY, final float tickTime) {
    errorScreen.drawDefaultBackground();
    final List t = new ArrayList();
    for (final String m : this.message) {
        if (m != null) {
            t.addAll(fontRenderer.listFormattedStringToWidth(m, errorScreen.width));
        }
    }
    int offset = Math.max(85 - t.size() * 10, 10);
    errorScreen.drawCenteredString(fontRenderer, this.cause, errorScreen.width / 2, offset, 16777215);
    offset += 10;
    for (final Object aT : t) {
        errorScreen.drawCenteredString(fontRenderer, (String)aT, errorScreen.width / 2, offset, 16777215);
        offset += 10;
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:17,代码来源:CustomErrorWGui.java

示例2: drawScreen

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime) {
    int y = 10;
    Collection<Throwable> visitedThrowables = new LinkedList<Throwable>();

    Throwable currentThrowable = this;
    while (currentThrowable != null && !visitedThrowables.contains(currentThrowable)) {
        String message = currentThrowable.getMessage();

        if (message == null) {
            message = currentThrowable.toString();
        }

        fontRenderer.drawSplitString(message, 10, y, errorScreen.width - 20, 0xFFFFFFFF);
        y += 30;

        visitedThrowables.add(currentThrowable);
        currentThrowable = currentThrowable.getCause();
    }
}
 
开发者ID:CannibalVox,项目名称:TechnicBlocks,代码行数:21,代码来源:ParseException.java

示例3: func_73866_w_

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
public void func_73866_w_() {
   this.field_74075_b = I18n.func_135053_a("selectWorld.title");

   try {
      this.func_74073_h();
   } catch (AnvilConverterException var2) {
      var2.printStackTrace();
      this.field_73882_e.func_71373_a(new GuiErrorScreen("Unable to load words", var2.getMessage()));
      return;
   }

   this.field_74087_p = I18n.func_135053_a("selectWorld.world");
   this.field_74086_q = I18n.func_135053_a("selectWorld.conversion");
   this.field_74085_r[EnumGameType.SURVIVAL.func_77148_a()] = I18n.func_135053_a("gameMode.survival");
   this.field_74085_r[EnumGameType.CREATIVE.func_77148_a()] = I18n.func_135053_a("gameMode.creative");
   this.field_74085_r[EnumGameType.ADVENTURE.func_77148_a()] = I18n.func_135053_a("gameMode.adventure");
   this.field_74079_o = new GuiWorldSlot(this);
   this.field_74079_o.func_77220_a(4, 5);
   this.func_74065_g();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:21,代码来源:GuiSelectWorld.java

示例4: drawScreen

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime) {
  int y = errorScreen.height / 2 - msgs.length * 5;
  for (String msg : msgs) {
    errorScreen.drawCenteredString(fontRenderer, msg, errorScreen.width / 2, y, 0xFFFFFF);
    y += 10;
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:9,代码来源:EnderCoreModConflictException.java

示例5: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void initGui() {
	super.initGui();
	try {
		loadSaveList();
	} catch(Exception e) {
		e.printStackTrace();
		mc.displayGuiScreen(new GuiErrorScreen("Unable to load worlds", e.getMessage()));
		return;
	}
}
 
开发者ID:AgeCraft,项目名称:AgeCraft-Old,代码行数:12,代码来源:GuiSelectWorld.java

示例6: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
public void initGui(final GuiErrorScreen errorScreen, final FontRenderer fontRenderer) {
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:3,代码来源:CustomErrorWGui.java

示例7: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) {
}
 
开发者ID:SleepyTrousers,项目名称:EnderCore,代码行数:4,代码来源:EnderCoreModConflictException.java

示例8: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
/**
 * Called after the GUI is initialized by the parent code. You can do extra stuff here, maybe?
 *
 * @param errorScreen The error screen we're painting
 * @param fontRenderer A font renderer for you
 */
public abstract void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer);
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:CustomModLoadingErrorDisplayException.java

示例9: drawScreen

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
/**
 * Draw your error to the screen.
 *
 * <br/><em>Warning: Minecraft is in a deep error state.</em> <strong>All</strong> it can do is stop.
 * Do not try and do anything involving complex user interaction here.
 *
 * @param errorScreen The error screen to draw to
 * @param fontRenderer A font renderer for you
 * @param mouseRelX Mouse X
 * @param mouseRelY Mouse Y
 * @param tickTime tick time
 */
public abstract void drawScreen(GuiErrorScreen errorScreen, FontRenderer fontRenderer, int mouseRelX, int mouseRelY, float tickTime);
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:14,代码来源:CustomModLoadingErrorDisplayException.java

示例10: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
/**
 * Called after the GUI is inited by the parent code. You can do extra stuff here, maybe?
 *
 * @param errorScreen The error screen we're painting
 * @param fontRenderer A font renderer for you
 */
public abstract void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer);
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:8,代码来源:CustomModLoadingErrorDisplayException.java

示例11: initGui

import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) {

}
 
开发者ID:CannibalVox,项目名称:TechnicBlocks,代码行数:5,代码来源:ParseException.java


注:本文中的net.minecraft.client.gui.GuiErrorScreen类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。