2014-05-27 19:15:49 +02:00
|
|
|
package appeng.parts.layers;
|
2014-05-27 19:06:55 +02:00
|
|
|
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
import appeng.api.parts.IPart;
|
|
|
|
import appeng.api.parts.LayerBase;
|
|
|
|
import buildcraft.api.mj.IBatteryObject;
|
|
|
|
import buildcraft.api.mj.ISidedBatteryProvider;
|
|
|
|
|
|
|
|
public class LayerIBatteryProvider extends LayerBase implements ISidedBatteryProvider
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IBatteryObject getMjBattery(String kind, ForgeDirection direction)
|
|
|
|
{
|
|
|
|
IPart p = getPart( direction );
|
|
|
|
|
|
|
|
if ( p instanceof ISidedBatteryProvider )
|
|
|
|
return ((ISidedBatteryProvider) p).getMjBattery( kind, direction );
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|