1
0
forked from xjboss/KCauldronX
KCauldronX/patches/net/minecraft/crash/CrashReport.java.patch

69 lines
2.7 KiB
Diff
Raw Normal View History

2015-06-22 12:06:21 +00:00
--- ../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;
2016-02-02 09:50:16 +00:00
@@ -15,12 +16,18 @@
2015-06-22 12:06:21 +00:00
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;
2016-02-02 09:50:16 +00:00
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 @@
2015-06-22 12:06:21 +00:00
return "1.7.10";
}
});
+ this.theReportCategory.addCrashSectionCallable("KCauldron Version", new Callable<String>() {
2015-06-26 16:47:31 +00:00
+ @Override
+ public String call() throws Exception {
+ return String.format("%s:%s:%s", KCauldron.getGroup(), KCauldron.getChannel(), KCauldron.getCurrentVersion());
+ }
2016-02-02 09:50:16 +00:00
+ });
+ 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();
+ }
2015-06-26 16:47:31 +00:00
+ });
2015-06-22 12:06:21 +00:00
this.theReportCategory.addCrashSectionCallable("Operating System", new Callable()
{
private static final String __OBFID = "CL_00001222";