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 @Override
final public double injectAEPower(double amt, Actionable mode) final public double injectAEPower(double amt, Actionable mode)
{ {
if ( amt < 0.000001 )
return 0;
if ( mode == Actionable.SIMULATE ) if ( mode == Actionable.SIMULATE )
{ {
double fakeBattery = internalCurrentPower + amt; double fakeBattery = internalCurrentPower + amt;

View file

@ -9,6 +9,7 @@ import appeng.api.config.PowerUnits;
import appeng.core.AppEng; import appeng.core.AppEng;
import appeng.tile.events.AETileEventHandler; import appeng.tile.events.AETileEventHandler;
import appeng.tile.events.TileEventType; import appeng.tile.events.TileEventType;
import appeng.util.Platform;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler; import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver; import buildcraft.api.power.PowerHandler.PowerReceiver;
@ -54,6 +55,8 @@ public abstract class BuildCraft extends AERootPoweredTile implements IPowerRece
BCPerdition bcPowerWrapper; BCPerdition bcPowerWrapper;
public BuildCraft() { public BuildCraft() {
if ( Platform.isServer() )
{
try try
{ {
if ( Loader.isModLoaded( "BuildCraftAPI|power" ) ) if ( Loader.isModLoaded( "BuildCraftAPI|power" ) )
@ -68,6 +71,7 @@ public abstract class BuildCraft extends AERootPoweredTile implements IPowerRece
// ignore.. no bc? // ignore.. no bc?
} }
} }
}
@Override @Override
@Method(modid = "BuildCraftAPI|power") @Method(modid = "BuildCraftAPI|power")

View file

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