Crash Enhancement Tweak!

This commit is contained in:
AlgorithmX2 2014-05-12 21:15:31 -05:00
parent c72b272da9
commit b2d240b6cc
2 changed files with 17 additions and 10 deletions

View file

@ -80,8 +80,7 @@ public class AppEng
IMCHandlers.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase(), new IMCP2PAttunement() ); IMCHandlers.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase(), new IMCP2PAttunement() );
} }
for (CrashInfo ci : CrashInfo.values()) FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.MOD_VERSION ) );
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( ci ) );
} }
public boolean isIntegrationEnabled(String Name) public boolean isIntegrationEnabled(String Name)
@ -157,6 +156,7 @@ public class AppEng
Registration.instance.PostInit( event ); Registration.instance.PostInit( event );
IntegrationRegistry.instance.postinit(); IntegrationRegistry.instance.postinit();
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( CrashInfo.INTEGRATION ) );
CommonHelper.proxy.postinit(); CommonHelper.proxy.postinit();
AEConfig.instance.save(); AEConfig.instance.save();

View file

@ -9,8 +9,21 @@ public class CrashEnhancement implements ICrashCallable
final CrashInfo Output; final CrashInfo Output;
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) { public CrashEnhancement(CrashInfo ci) {
Output = ci; Output = ci;
if ( IntegrationRegistry.instance != null )
IntegrationInfo = IntegrationRegistry.instance.getStatus();
else
IntegrationInfo = "N/A";
} }
@Override @Override
@ -19,15 +32,9 @@ public class CrashEnhancement implements ICrashCallable
switch (Output) switch (Output)
{ {
case MOD_VERSION: case MOD_VERSION:
return AEConfig.CHANNEL + " " + AEConfig.VERSION + " for Forge " return ModVersion;
+ net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion
+ net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion
+ net.minecraftforge.common.ForgeVersion.revisionVersion + "." // revisionVersion
+ net.minecraftforge.common.ForgeVersion.buildVersion;
case INTEGRATION: case INTEGRATION:
if ( IntegrationRegistry.instance == null ) return IntegrationInfo;
return "N/A";
return IntegrationRegistry.instance.getStatus();
} }
return "UNKNOWN_VALUE"; return "UNKNOWN_VALUE";