本文整理汇总了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;
}
}
示例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();
}
}
示例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();
}
示例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;
}
}
示例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;
}
}
示例6: initGui
import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
public void initGui(final GuiErrorScreen errorScreen, final FontRenderer fontRenderer) {
}
示例7: initGui
import net.minecraft.client.gui.GuiErrorScreen; //导入依赖的package包/类
@Override
public void initGui(GuiErrorScreen errorScreen, FontRenderer fontRenderer) {
}
示例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);
示例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);
示例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) {
}