Added Integration Check
This commit is contained in:
parent
e7cda2b8e0
commit
24ad83356c
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue