Files
CatServer/patches/net/minecraft/crash/CrashReportCategory.java.patch
2019-02-24 22:29:41 +08:00

53 lines
2.3 KiB
Diff

--- ../src-base/minecraft/net/minecraft/crash/CrashReportCategory.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReportCategory.java
@@ -12,7 +12,7 @@
{
private final CrashReport crashReport;
private final String name;
- private final List<CrashReportCategory.Entry> children = Lists.<CrashReportCategory.Entry>newArrayList();
+ private final List<Entry> children = Lists.<Entry>newArrayList();
private StackTraceElement[] stackTrace = new StackTraceElement[0];
public CrashReportCategory(CrashReport report, String name)
@@ -103,7 +103,7 @@
public void addCrashSection(String sectionName, Object value)
{
- this.children.add(new CrashReportCategory.Entry(sectionName, value));
+ this.children.add(new Entry(sectionName, value));
}
public void addCrashSectionThrowable(String sectionName, Throwable throwable)
@@ -121,8 +121,11 @@
}
else
{
- this.stackTrace = new StackTraceElement[astacktraceelement.length - 3 - size];
- System.arraycopy(astacktraceelement, 3 + size, this.stackTrace, 0, this.stackTrace.length);
+ int len = astacktraceelement.length - 3 - size;
+ // Really Mojang, Still, god damn...
+ if (len <= 0) len = astacktraceelement.length;
+ this.stackTrace = new StackTraceElement[len];
+ System.arraycopy(astacktraceelement, astacktraceelement.length - len, this.stackTrace, 0, this.stackTrace.length);
return this.stackTrace.length;
}
}
@@ -172,7 +175,7 @@
builder.append("-- ").append(this.name).append(" --\n");
builder.append("Details:");
- for (CrashReportCategory.Entry crashreportcategory$entry : this.children)
+ for (Entry crashreportcategory$entry : this.children)
{
builder.append("\n\t");
builder.append(crashreportcategory$entry.getKey());
@@ -206,7 +209,7 @@
{
try
{
- return String.format("ID #%d (%s // %s)", i, blockIn.getUnlocalizedName(), blockIn.getClass().getCanonicalName());
+ return String.format("ID #%d (%s // %s // %s)", i, blockIn.getUnlocalizedName(), blockIn.getClass().getName(), blockIn.getRegistryName());
}
catch (Throwable var2)
{