2013-12-27 23:59:59 +01:00
|
|
|
package appeng.core.crash;
|
|
|
|
|
2014-02-09 06:08:27 +01:00
|
|
|
import appeng.core.AEConfig;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.integration.IntegrationRegistry;
|
|
|
|
import cpw.mods.fml.common.ICrashCallable;
|
|
|
|
|
|
|
|
public class CrashEnhancement implements ICrashCallable
|
|
|
|
{
|
|
|
|
|
2014-05-21 20:24:58 +02:00
|
|
|
private final String name;
|
|
|
|
private final String value;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-21 20:24:58 +02:00
|
|
|
private final String ModVersion = AEConfig.CHANNEL + " " + AEConfig.VERSION + " for Forge " + // WHAT?
|
2014-05-13 04:15:31 +02:00
|
|
|
net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.revisionVersion + "." // revisionVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
|
|
|
|
2014-05-21 20:24:58 +02:00
|
|
|
public CrashEnhancement(CrashInfo Output) {
|
|
|
|
|
|
|
|
if ( Output == CrashInfo.MOD_VERSION )
|
|
|
|
{
|
|
|
|
name = "AE2 Version";
|
|
|
|
value = ModVersion;
|
|
|
|
}
|
|
|
|
else if ( Output == CrashInfo.INTEGRATION )
|
|
|
|
{
|
|
|
|
name ="AE2 Integration";
|
|
|
|
if ( IntegrationRegistry.instance != null )
|
|
|
|
value = IntegrationRegistry.instance.getStatus();
|
|
|
|
else
|
|
|
|
value = "N/A";
|
|
|
|
}
|
2014-05-13 04:15:31 +02:00
|
|
|
else
|
2014-05-21 20:24:58 +02:00
|
|
|
{
|
|
|
|
name = "AE2_UNKNOWN";
|
|
|
|
value = "UNKNOWN_VALUE";
|
|
|
|
}
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String call() throws Exception
|
|
|
|
{
|
2014-05-21 20:24:58 +02:00
|
|
|
return value;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getLabel()
|
|
|
|
{
|
2014-05-21 20:24:58 +02:00
|
|
|
return name;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|