mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Tabulate crash report mod list and add signature information (#4251)
This commit is contained in:
1 parent
a40df67004
commit
43e24c3eb4
4 files changed
+364
-5
No files matched your search
@@ -28,6 +28,7 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraftforge.common.util.TextTable;
|
||||
import net.minecraftforge.fml.common.LoaderState.ModState;
|
||||
import net.minecraftforge.fml.common.ProgressManager.ProgressBar;
|
||||
import net.minecraftforge.fml.common.event.FMLEvent;
|
||||
@@ -310,14 +311,28 @@ public class LoadController
|
||||
for (ModState state : ModState.values())
|
||||
ret.append(" '").append(state.getMarker()).append("' = ").append(state.toString());
|
||||
|
||||
TextTable table = new TextTable(Lists.newArrayList(
|
||||
TextTable.column("State"),
|
||||
TextTable.column("ID"),
|
||||
TextTable.column("Version"),
|
||||
TextTable.column("Source"),
|
||||
TextTable.column("Signature"))
|
||||
);
|
||||
for (ModContainer mc : loader.getModList())
|
||||
{
|
||||
ret.append("\n\t");
|
||||
for (ModState state : modStates.get(mc.getModId()))
|
||||
ret.append(state.getMarker());
|
||||
|
||||
ret.append("\t").append(mc.getModId()).append("{").append(mc.getVersion()).append("} [").append(mc.getName()).append("] (").append(mc.getSource().getName()).append(") ");
|
||||
table.add(
|
||||
modStates.get(mc.getModId()).stream().map(ModState::getMarker).reduce("", (a, b) -> a + b),
|
||||
mc.getModId(),
|
||||
mc.getVersion(),
|
||||
mc.getSource().getName(),
|
||||
mc.getSigningCertificate() != null ? CertificateHelper.getFingerprint(mc.getSigningCertificate()) : "None"
|
||||
);
|
||||
}
|
||||
|
||||
ret.append("\n");
|
||||
ret.append("\n\t");
|
||||
table.append(ret, "\n\t");
|
||||
ret.append("\n");
|
||||
}
|
||||
|
||||
public List<ModContainer> getActiveModList()
|
||||
|
||||
Reference in new issue
Block a user