diff --git a/tile/powersink/BuildCraft.java b/tile/powersink/BuildCraft.java index eeb86a51..6b8a4b50 100644 --- a/tile/powersink/BuildCraft.java +++ b/tile/powersink/BuildCraft.java @@ -26,11 +26,14 @@ public abstract class BuildCraft extends AERootPoweredTile implements IPowerRece { if ( Loader.isModLoaded( "BuildCraftAPI|power" ) ) { - IBC bcIntegration = (IBC) AppEng.instance.getIntegration( "BC" ); - if ( bcIntegration != null ) + if ( AppEng.instance.isIntegrationEnabled( "BC" ) ) { - addNewHandler( bcPowerWrapper = bcIntegration.createPerdition( this ) ); - bcPowerWrapper.configure( 1, 380, 1.0f / 5.0f, 1000 ); + IBC bcIntegration = (IBC) AppEng.instance.getIntegration( "BC" ); + if ( bcIntegration != null ) + { + addNewHandler( bcPowerWrapper = bcIntegration.createPerdition( this ) ); + bcPowerWrapper.configure( 1, 380, 1.0f / 5.0f, 1000 ); + } } } } diff --git a/tile/powersink/IC2.java b/tile/powersink/IC2.java index f55bff82..8ae9e9a2 100644 --- a/tile/powersink/IC2.java +++ b/tile/powersink/IC2.java @@ -78,21 +78,27 @@ public abstract class IC2 extends BuildCraft implements IEnergySink final private void addToENet() { - IIC2 ic2Integration = (IIC2) AppEng.instance.getIntegration( "IC2" ); - if ( !isInIC2 && Platform.isServer() && ic2Integration != null ) + if ( AppEng.instance.isIntegrationEnabled( "IC2" ) ) { - ic2Integration.addToEnergyNet( this ); - isInIC2 = true; + IIC2 ic2Integration = (IIC2) AppEng.instance.getIntegration( "IC2" ); + if ( !isInIC2 && Platform.isServer() && ic2Integration != null ) + { + ic2Integration.addToEnergyNet( this ); + isInIC2 = true; + } } } final private void removeFromENet() { - IIC2 ic2Integration = (IIC2) AppEng.instance.getIntegration( "IC2" ); - if ( isInIC2 && Platform.isServer() && ic2Integration != null ) + if ( AppEng.instance.isIntegrationEnabled( "IC2" ) ) { - ic2Integration.removeFromEnergyNet( this ); - isInIC2 = false; + IIC2 ic2Integration = (IIC2) AppEng.instance.getIntegration( "IC2" ); + if ( isInIC2 && Platform.isServer() && ic2Integration != null ) + { + ic2Integration.removeFromEnergyNet( this ); + isInIC2 = false; + } } }