No need to handle BC/RtC power on the client now is there...
This commit is contained in:
parent
ef86454c44
commit
ab192bcdc5
3 changed files with 18 additions and 10 deletions
|
@ -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;
|
||||||
|
|
|
@ -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,18 +55,21 @@ public abstract class BuildCraft extends AERootPoweredTile implements IPowerRece
|
||||||
BCPerdition bcPowerWrapper;
|
BCPerdition bcPowerWrapper;
|
||||||
|
|
||||||
public BuildCraft() {
|
public BuildCraft() {
|
||||||
try
|
if ( Platform.isServer() )
|
||||||
{
|
{
|
||||||
if ( Loader.isModLoaded( "BuildCraftAPI|power" ) )
|
try
|
||||||
{
|
{
|
||||||
if ( AppEng.instance.isIntegrationEnabled( "" ) )
|
if ( Loader.isModLoaded( "BuildCraftAPI|power" ) )
|
||||||
addNewHandler( bcPowerWrapper = new BCPerdition( this ) );
|
{
|
||||||
bcPowerWrapper.bcPowerHandler.configure( 1, 380, 1.0f / 5.0f, 1000 );
|
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?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
|
||||||
};
|
};
|
||||||
|
|
||||||
public RotaryCraft() {
|
public RotaryCraft() {
|
||||||
addNewHandler( new RotaryCraftHandler() );
|
if ( Platform.isServer() )
|
||||||
|
addNewHandler( new RotaryCraftHandler() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue