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
|
|
|
|
{
|
|
|
|
|
|
|
|
final CrashInfo Output;
|
|
|
|
|
2014-05-13 04:15:31 +02:00
|
|
|
final String ModVersion = AEConfig.CHANNEL + " " + AEConfig.VERSION + " for Forge " + // WHAT?
|
|
|
|
net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.revisionVersion + "." // revisionVersion
|
|
|
|
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
|
|
|
|
|
|
|
final String IntegrationInfo;
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
public CrashEnhancement(CrashInfo ci) {
|
|
|
|
Output = ci;
|
2014-05-13 04:15:31 +02:00
|
|
|
|
|
|
|
if ( IntegrationRegistry.instance != null )
|
|
|
|
IntegrationInfo = IntegrationRegistry.instance.getStatus();
|
|
|
|
else
|
|
|
|
IntegrationInfo = "N/A";
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String call() throws Exception
|
|
|
|
{
|
|
|
|
switch (Output)
|
|
|
|
{
|
|
|
|
case MOD_VERSION:
|
2014-05-13 04:15:31 +02:00
|
|
|
return ModVersion;
|
2013-12-27 23:59:59 +01:00
|
|
|
case INTEGRATION:
|
2014-05-13 04:15:31 +02:00
|
|
|
return IntegrationInfo;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return "UNKNOWN_VALUE";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getLabel()
|
|
|
|
{
|
|
|
|
switch (Output)
|
|
|
|
{
|
|
|
|
case MOD_VERSION:
|
|
|
|
return "AE2 Version";
|
|
|
|
case INTEGRATION:
|
|
|
|
return "AE2 Integration";
|
|
|
|
}
|
|
|
|
|
|
|
|
return "AE2_UNKNOWN";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|