Update build (#1)

* Switch to GTNH ForgeGradle

* spotlessApply

* Switch to Sponge Mixin, reformat file names, drop Grimoire dependency

* Fix mapping

* Workflows

* CODEOWNERS

* .editorconfig

* Update README

* updateBuildScript

* address review

* remove spotless.gradle
This commit is contained in:
miozune authored and GitHub committed 2022-07-18 11:37:13 +07:00
1 parent 9b900985a4
commit 96dbab660d
32 files changed
+1580 -266

No files matched your search

@@ -9,20 +9,18 @@ package vfyjxf.bettercrashes.utils;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
import net.minecraft.crash.CrashReport;
import org.apache.commons.lang3.StringUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@SideOnly(Side.CLIENT)
public abstract class GuiProblemScreen extends GuiScreen{
public abstract class GuiProblemScreen extends GuiScreen {
protected final CrashReport report;
private String hasteLink = null;
@@ -36,13 +34,20 @@ public abstract class GuiProblemScreen extends GuiScreen{
public void initGui() {
mc.setIngameNotInFocus();
buttonList.clear();
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")));
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){
if (button.id == 1) {
try {
CrashUtils.openCrashReport(report);
} catch (IOException e) {
@@ -51,10 +56,11 @@ public abstract class GuiProblemScreen extends GuiScreen{
e.printStackTrace();
}
}
if(button.id == 2){
if(hasteLink == null){
if (button.id == 2) {
if (hasteLink == null) {
try {
hasteLink = CrashReportUpload.uploadToUbuntuPastebin("https://paste.ubuntu.com",report.getCompleteReport());
hasteLink = CrashReportUpload.uploadToUbuntuPastebin(
"https://paste.ubuntu.com", report.getCompleteReport());
} catch (IOException e) {
button.displayString = I18n.format("bettercrashes.gui.failed");
button.enabled = false;
@@ -63,7 +69,6 @@ public abstract class GuiProblemScreen extends GuiScreen{
}
setClipboardString(hasteLink);
}
}
@Override