mirror of
https://github.com/GTNewHorizons/BetterCrashes.git
synced 2026-11-22 04:52:29 +00:00
Update crash report uoloader
This commit is contained in:
1 parent
ed1dd95352
commit
70650e9f84
8 files changed
+43
-50
No files matched your search
@@ -2,9 +2,8 @@
|
||||
|
||||
BetterCrashes is a port of VanillaFix's crash improvement features to Minecraft 1.7.10.
|
||||
|
||||
BetterCrashes makes Minecraft return you to the main menu when it crashes,and offer to upload
|
||||
|
||||
your CrashReport to [ubuntu Pastebin](http://paste.ubuntu.com/) (closed by default).
|
||||
BetterCrashes makes Minecraft return you to the main menu when it crashes,and it can upload your Crash-Report to
|
||||
[Ubuntu Pastebin](http://paste.ubuntu.com/) for send the link easier.
|
||||
|
||||
Most of the code comes from VanillaFix, I just make them work on Minecraft 1.7.10.
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ org.gradle.daemon=false
|
||||
|
||||
# General Specifications
|
||||
mc_version=1.7.10
|
||||
mod_version=1.1.0
|
||||
mod_version=1.1.1
|
||||
forge_version=10.13.4.1614
|
||||
mod_group=vfyjxf.bettercrashes
|
||||
mod_id=bettercrashes
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
package vfyjxf.bettercrashes;
|
||||
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Mod(modid = BetterCrashes.MODID, version = BetterCrashes.VERSION, name = BetterCrashes.NAME,dependencies = BetterCrashes.DEPENDENCIES)
|
||||
public class BetterCrashes {
|
||||
public static final String MODID = "bettercrashes";
|
||||
@@ -18,8 +13,5 @@ public class BetterCrashes {
|
||||
public static final String DEPENDENCIES = "required-after:grimoire";
|
||||
public static final Logger logger = LogManager.getLogger("BetterCrashes");
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event){
|
||||
BetterCrashesConfig.loadConfig(new File(Minecraft.getMinecraft().mcDataDir,"config/BetterCrashes.cfg"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,14 +16,15 @@ import net.minecraft.crash.CrashReport;
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiCrashScreen extends GuiProblemScreen{
|
||||
public class GuiCrashScreen extends GuiProblemScreen {
|
||||
public GuiCrashScreen(CrashReport report) {
|
||||
super(report);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
GuiOptionButton mainMenuButton = new GuiOptionButton(0, width / 2 - 155, height / 4 + 120 + 12, I18n.format("bettercrashes.gui.toTitle"));
|
||||
GuiOptionButton mainMenuButton = new GuiOptionButton(0, width / 2 - 50 - 115, height / 4 + 120 + 12, 110, 20, I18n.format("bettercrashes.gui.toTitle"));
|
||||
buttonList.add(mainMenuButton);
|
||||
}
|
||||
|
||||
@@ -56,7 +57,7 @@ public class GuiCrashScreen extends GuiProblemScreen{
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.crashscreen.paragraph3.line1"), x, y += 12, textColor);
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.crashscreen.paragraph3.line2"), x, y += 9, textColor);
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.crashscreen.paragraph3.line3"), x, y += 9, textColor);
|
||||
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.crashscreen.paragraph3.line4"), x, y += 9, textColor);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@ public class GuiInitErrorScreen extends GuiProblemScreen{
|
||||
public void initGui() {
|
||||
mc.setIngameNotInFocus();
|
||||
buttonList.clear();
|
||||
buttonList.add(new GuiButton(1, width / 2 - 155, height / 4 + 120 + 12, 310, 20, I18n.format("bettercrashes.gui.openCrashReport")));
|
||||
buttonList.add(new GuiButton(1,width / 2 - 155, height / 4 + 120 + 12, 150, 20, I18n.format("bettercrashes.gui.openCrashReport")));
|
||||
buttonList.add(new GuiButton(2, width / 2 - 155 + 160, height / 4 + 120 + 12, 150, 20, I18n.format("bettercrashes.gui.uploadReportAndCopyLink")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,7 +54,7 @@ public class GuiInitErrorScreen extends GuiProblemScreen{
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.initerrorscreen.paragraph3.line1"), x, y += 12, textColor);
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.initerrorscreen.paragraph3.line2"), x, y += 9, textColor);
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.initerrorscreen.paragraph3.line3"), x, y += 9, textColor);
|
||||
|
||||
drawString(fontRendererObj, I18n.format("bettercrashes.initerrorscreen.paragraph3.line4"), x, y += 9, textColor);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import vfyjxf.bettercrashes.BetterCrashesConfig;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,17 +36,22 @@ public abstract class GuiProblemScreen extends GuiScreen{
|
||||
public void initGui() {
|
||||
mc.setIngameNotInFocus();
|
||||
buttonList.clear();
|
||||
if(BetterCrashesConfig.enableUploadCrash) {
|
||||
buttonList.add(new GuiButton(1, width / 2 - 155 + 160, height / 4 + 120 + 12, 150, 20, I18n.format("bettercrashes.gui.uploadReportAndCopyLink")));
|
||||
}else {
|
||||
buttonList.add(new GuiButton(1, width / 2 - 155 + 160, height / 4 + 120 + 12, 150, 20, I18n.format("bettercrashes.gui.openCrashReport")));
|
||||
}
|
||||
buttonList.add(new GuiButton(1, width / 2 - 50, height / 4 + 120 + 12, 110, 20, I18n.format("bettercrashes.gui.openCrashReport")));
|
||||
buttonList.add(new GuiButton(2, width / 2 - 50 + 115, height / 4 + 120 + 12, 110, 20, I18n.format("bettercrashes.gui.uploadReportAndCopyLink")));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
if(button.id == 1 && BetterCrashesConfig.enableUploadCrash){
|
||||
if (button.id == 1){
|
||||
try {
|
||||
CrashUtils.openCrashReport(report);
|
||||
} catch (IOException e) {
|
||||
button.displayString = I18n.format("bettercrashes.gui.failed");
|
||||
button.enabled = false;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if(button.id == 2){
|
||||
if(hasteLink == null){
|
||||
try {
|
||||
hasteLink = CrashReportUpload.uploadToUbuntuPastebin("https://paste.ubuntu.com",report.getCompleteReport());
|
||||
@@ -58,15 +62,8 @@ public abstract class GuiProblemScreen extends GuiScreen{
|
||||
}
|
||||
}
|
||||
setClipboardString(hasteLink);
|
||||
}else if (button.id == 1){
|
||||
try {
|
||||
CrashUtils.openCrashReport(report);
|
||||
} catch (IOException e) {
|
||||
button.displayString = I18n.format("bettercrashes.gui.failed");
|
||||
button.enabled = false;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
bettercrashes.gui.uploadReportAndCopyLink=Copy Link
|
||||
bettercrashes.gui.uploadReportAndCopyLink=Upload and copy link
|
||||
bettercrashes.gui.openCrashReport=Open Crash Report
|
||||
bettercrashes.gui.failed=[Failed]
|
||||
bettercrashes.crashscreen.identificationErrored=[Error identifying]
|
||||
@@ -9,14 +9,15 @@ bettercrashes.crashscreen.title=Minecraft crashed!
|
||||
bettercrashes.crashscreen.summary=Minecraft ran into a problem and crashed.
|
||||
bettercrashes.crashscreen.paragraph1.line1=The following mod(s) have been identified as potential causes:
|
||||
bettercrashes.crashscreen.paragraph2.line1=report has been generated, and click the button below to open:
|
||||
bettercrashes.crashscreen.paragraph3.line1=You're encouraged to send this report to the mod's author to help
|
||||
bettercrashes.crashscreen.paragraph3.line2=them fix the issue. Since Since BetterCrashes is installed, you can keep
|
||||
bettercrashes.crashscreen.paragraph3.line3=playing despite the crash.
|
||||
bettercrashes.crashscreen.paragraph3.line1=You're encouraged to send this report's link to the mod's author to help
|
||||
bettercrashes.crashscreen.paragraph3.line2=them fix the issue, click the "Upload and Copy link" can upload report
|
||||
bettercrashes.crashscreen.paragraph3.line3=and copy its link to clipboard. Since BetterCrashes is installed, you
|
||||
bettercrashes.crashscreen.paragraph3.line4=can keep playing despite the crash.
|
||||
|
||||
bettercrashes.initerrorscreen.title=Minecraft failed to start!
|
||||
bettercrashes.initerrorscreen.summary=An error during startup prevented Minecraft from starting.
|
||||
bettercrashes.initerrorscreen.paragraph2.line1=report has been generated, and click the button below to open:
|
||||
bettercrashes.initerrorscreen.paragraph3.line1=You're encouraged to send this report to the mod's author to help
|
||||
bettercrashes.initerrorscreen.paragraph3.line2=them fix the issue. Since BetterCrashes is installed, you can keep
|
||||
bettercrashes.initerrorscreen.paragraph3.line3=playing despite the crash.
|
||||
|
||||
bettercrashes.initerrorscreen.paragraph3.line1=You're encouraged to send this report's link to the mod's author to help
|
||||
bettercrashes.initerrorscreen.paragraph3.line2=them fix the issue, click the "Upload and Copy link" can upload report
|
||||
bettercrashes.initerrorscreen.paragraph3.line3=and copy its link to clipboard. Since BetterCrashes is installed, you
|
||||
bettercrashes.initerrorscreen.paragraph3.line4=can keep playing despite the crash.
|
||||
@@ -1,4 +1,4 @@
|
||||
bettercrashes.gui.uploadReportAndCopyLink=复制链接到剪贴板
|
||||
bettercrashes.gui.uploadReportAndCopyLink=上传并复制链接
|
||||
bettercrashes.gui.openCrashReport=打开崩溃报告
|
||||
bettercrashes.gui.failed=[失败]
|
||||
bettercrashes.crashscreen.identificationErrored=[鉴别错误]
|
||||
@@ -9,14 +9,16 @@ bettercrashes.crashscreen.title=Minecraft崩溃啦!
|
||||
bettercrashes.crashscreen.summary=Minecraft遇到了一个问题并崩溃了。
|
||||
bettercrashes.crashscreen.paragraph1.line1=下列模组被认为可能是导致崩溃的原因:
|
||||
bettercrashes.crashscreen.paragraph2.line1=一份报告已经生成,点击下方的按钮可以打开它:
|
||||
bettercrashes.crashscreen.paragraph3.line1=我们建议您将此报告发送给模组的作者以帮助它们修复问题。
|
||||
bettercrashes.crashscreen.paragraph3.line2=由于安装了BetterCrashes,尽管发生了崩溃,你仍然可以继续进行游戏。
|
||||
bettercrashes.crashscreen.paragraph3.line3=
|
||||
bettercrashes.crashscreen.paragraph3.line1=我们建议您将此报告的链接发送给模组的作者以帮助它们修复问题,
|
||||
bettercrashes.crashscreen.paragraph3.line2=点击"上传并复制链接"即可上传报告并复制它的链接至剪贴板。
|
||||
bettercrashes.crashscreen.paragraph3.line3=由于安装了BetterCrashes,尽管发生了崩溃,你仍然可以继续进行游戏。
|
||||
bettercrashes.crashscreen.paragraph3.line4=
|
||||
|
||||
bettercrashes.initerrorscreen.title=Minecraft未能启动!
|
||||
bettercrashes.initerrorscreen.summary=启动过程中的一个错误阻止了Minecraft的启动
|
||||
bettercrashes.initerrorscreen.paragraph2.line1=一份报告已经生成,点击下方的按钮可以打开它:
|
||||
bettercrashes.initerrorscreen.paragraph3.line1=我们建议您将此报告发送给模组的作者以帮助它们修复问题。
|
||||
bettercrashes.initerrorscreen.paragraph3.line2=由于安装了BetterCrashes,尽管发生了崩溃,你仍然可以继续进行游戏。
|
||||
bettercrashes.initerrorscreen.paragraph3.line3=
|
||||
bettercrashes.initerrorscreen.paragraph3.line1=我们建议您将此报告的链接发送给模组的作者以帮助它们修复问题,
|
||||
bettercrashes.initerrorscreen.paragraph3.line2=点击"上传并复制链接"即可上传报告并复制它的链接至剪贴板。
|
||||
bettercrashes.initerrorscreen.paragraph3.line3=由于安装了BetterCrashes,尽管发生了崩溃,你仍然可以继续进行游戏。
|
||||
bettercrashes.initerrorscreen.paragraph3.line4=
|
||||
|
||||
Reference in new issue
Block a user