Cleaning Up Mod Integrations (#2581)

* Cleaned up unused Mod integrations other than for mods that are likely to be integrated soon.
* Introduced an easier Facade class to access mod integration abstractions (called Integrations).
* Removed the link between IntegrationType and integration abstraction. Integrations are now explicitly instantiated inside of IntegrationNode.
This commit is contained in:
shartte
2016-11-06 20:23:14 +01:00
committed by yueh
parent fbb0c05c7f
commit 0e7981d717
73 changed files with 689 additions and 1295 deletions
@@ -29,8 +29,7 @@ import appeng.api.exceptions.RegistrationError;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IIngredient;
import appeng.core.AELog;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.Integrations;
import appeng.integration.abstraction.IRC;
import appeng.recipes.RecipeHandler;
import appeng.util.Platform;
@@ -61,19 +60,16 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer
@Override
public void register() throws RegistrationError, MissingIngredientError
{
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RC ) )
final IRC rc = Integrations.rc();
for( final ItemStack is : this.pro_input.getItemStackSet() )
{
final IRC rc = (IRC) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.RC );
for( final ItemStack is : this.pro_input.getItemStackSet() )
try
{
try
{
rc.rockCrusher( is, this.pro_output[0].getItemStack() );
}
catch( final java.lang.RuntimeException err )
{
AELog.info( "RC not happy - " + err.getMessage() );
}
rc.rockCrusher( is, this.pro_output[0].getItemStack() );
}
catch( final java.lang.RuntimeException err )
{
AELog.info( "RC not happy - " + err.getMessage() );
}
}
}