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; } }
@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(); } }
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(); }
@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; } }
@Override public void initGui() { super.initGui(); try { loadSaveList(); } catch(Exception e) { e.printStackTrace(); mc.displayGuiScreen(new GuiErrorScreen("Unable to load worlds", e.getMessage())); return; } }
public void initGui(final GuiErrorScreen errorScreen, final FontRenderer fontRenderer) { }
@Override public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) { }
/** * 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);
/** * 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);
/** * 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);