No need to handle BC/RtC power on the client now is there...

This commit is contained in:
AlgorithmX2 2014-01-01 03:03:31 -06:00
parent ef86454c44
commit ab192bcdc5
3 changed files with 18 additions and 10 deletions

View File

@ -88,6 +88,9 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
@Override
final public double injectAEPower(double amt, Actionable mode)
{
if ( amt < 0.000001 )
return 0;
if ( mode == Actionable.SIMULATE )
{
double fakeBattery = internalCurrentPower + amt;

View File

@ -9,6 +9,7 @@ import appeng.api.config.PowerUnits;
import appeng.core.AppEng;
import appeng.tile.events.AETileEventHandler;
import appeng.tile.events.TileEventType;
import appeng.util.Platform;
import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
@ -54,18 +55,21 @@ public abstract class BuildCraft extends AERootPoweredTile implements IPowerRece
BCPerdition bcPowerWrapper;
public BuildCraft() {
try
if ( Platform.isServer() )
{
if ( Loader.isModLoaded( "BuildCraftAPI|power" ) )
try
{
if ( AppEng.instance.isIntegrationEnabled( "" ) )
addNewHandler( bcPowerWrapper = new BCPerdition( this ) );
bcPowerWrapper.bcPowerHandler.configure( 1, 380, 1.0f / 5.0f, 1000 );
if ( Loader.isModLoaded( "BuildCraftAPI|power" ) )
{
if ( AppEng.instance.isIntegrationEnabled( "" ) )
addNewHandler( bcPowerWrapper = new BCPerdition( this ) );
bcPowerWrapper.bcPowerHandler.configure( 1, 380, 1.0f / 5.0f, 1000 );
}
}
catch (Throwable t)
{
// ignore.. no bc?
}
}
catch (Throwable t)
{
// ignore.. no bc?
}
}

View File

@ -35,7 +35,8 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
};
public RotaryCraft() {
addNewHandler( new RotaryCraftHandler() );
if ( Platform.isServer() )
addNewHandler( new RotaryCraftHandler() );
}
@Override