forked from xjboss/KCauldronX
69 lines
2.8 KiB
Diff
69 lines
2.8 KiB
Diff
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
|
|
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
|
|
@@ -3,6 +3,7 @@
|
|
import cpw.mods.fml.common.FMLCommonHandler;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
+
|
|
import java.io.File;
|
|
import java.io.FileWriter;
|
|
import java.io.PrintWriter;
|
|
@@ -15,12 +16,18 @@
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.concurrent.Callable;
|
|
+
|
|
+import kcauldron.KCauldron;
|
|
import net.minecraft.util.ReportedException;
|
|
import net.minecraft.world.gen.layer.IntCache;
|
|
+
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
+import org.bukkit.Bukkit;
|
|
+import org.bukkit.ChatColor;
|
|
+import org.bukkit.plugin.Plugin;
|
|
|
|
public class CrashReport
|
|
{
|
|
@@ -51,6 +58,38 @@
|
|
return "1.7.10";
|
|
}
|
|
});
|
|
+ this.theReportCategory.addCrashSectionCallable("KCauldron Version", new Callable<String>() {
|
|
+ @Override
|
|
+ public String call() throws Exception {
|
|
+ return String.format("%s:%s:%s %s", KCauldron.getGroup(), KCauldron.getChannel(), KCauldron.getCurrentVersion(), KCauldron.isOfficial() ? "Official" : "UNOFFICIAL DON'T REPORT THIS CRASH");
|
|
+ }
|
|
+ });
|
|
+ this.theReportCategory.addCrashSectionCallable("Plugins", new Callable<String>() {
|
|
+ @Override
|
|
+ public String call() throws Exception {
|
|
+ StringBuilder pluginList = new StringBuilder();
|
|
+ Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
|
|
+ for (Plugin plugin : plugins) {
|
|
+ if (pluginList.length() > 0)
|
|
+ pluginList.append(", ");
|
|
+ if (plugin.isEnabled()) pluginList.append(plugin.getDescription().getName());
|
|
+ }
|
|
+ return pluginList.toString();
|
|
+ }
|
|
+ });
|
|
+ this.theReportCategory.addCrashSectionCallable("Disabled Plugins", new Callable<String>() {
|
|
+ @Override
|
|
+ public String call() throws Exception {
|
|
+ StringBuilder pluginList = new StringBuilder();
|
|
+ Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
|
|
+ for (Plugin plugin : plugins) {
|
|
+ if (pluginList.length() > 0)
|
|
+ pluginList.append(", ");
|
|
+ if (!plugin.isEnabled()) pluginList.append(plugin.getDescription().getName());
|
|
+ }
|
|
+ return pluginList.toString();
|
|
+ }
|
|
+ });
|
|
this.theReportCategory.addCrashSectionCallable("Operating System", new Callable()
|
|
{
|
|
private static final String __OBFID = "CL_00001222";
|