Applied-Energistics-2-tiler.../core/crash/CrashEnhancement.java

58 lines
1.3 KiB
Java
Raw Normal View History

package appeng.core.crash;
2014-02-09 06:08:27 +01:00
import appeng.core.AEConfig;
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;
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";
}
@Override
public String call() throws Exception
{
switch (Output)
{
case MOD_VERSION:
2014-05-13 04:15:31 +02:00
return ModVersion;
case INTEGRATION:
2014-05-13 04:15:31 +02:00
return IntegrationInfo;
}
return "UNKNOWN_VALUE";
}
@Override
public String getLabel()
{
switch (Output)
{
case MOD_VERSION:
return "AE2 Version";
case INTEGRATION:
return "AE2 Integration";
}
return "AE2_UNKNOWN";
}
}