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

54 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
{
private final String name;
private final String value;
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;
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
{
name = "AE2_UNKNOWN";
value = "UNKNOWN_VALUE";
}
}
@Override
public String call() throws Exception
{
return value;
}
@Override
public String getLabel()
{
return name;
}
}