Removed Old RF Api.

This commit is contained in:
AlgorithmX2 2014-05-09 09:42:52 -05:00
parent 5675f5c5fd
commit 98fc460da0
5 changed files with 22 additions and 26 deletions

View file

@ -466,14 +466,24 @@ public class Registration
recipeHandler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );
IPartHelper ph = AEApi.instance().partHelper();
ph.registerNewLayer( "appeng.api.parts.layers.LayerISidedInventory", "net.minecraft.inventory.ISidedInventory" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
if ( AppEng.instance.isIntegrationEnabled( "IC2" ) )
{
ph.registerNewLayer( "appeng.api.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerISidedInventory", "net.minecraft.inventory.ISidedInventory" );
}
if ( AppEng.instance.isIntegrationEnabled( "MJ" ) )
{
ph.registerNewLayer( "appeng.api.parts.layers.LayerIPowerEmitter", "buildcraft.api.power.IPowerEmitter" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerIPowerReceptor", "buildcraft.api.power.IPowerReceptor" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
}
if ( AppEng.instance.isIntegrationEnabled( "RF" ) )
ph.registerNewLayer( "appeng.api.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyHandler" );
ph.registerNewLayer( "appeng.api.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
FMLCommonHandler.instance().bus().register( TickHandler.instance );
MinecraftForge.EVENT_BUS.register( new PartPlacement() );

View file

@ -16,6 +16,7 @@ public class RF extends BaseModule implements IIntegrationModule
public RF() {
TestClass( cofh.api.energy.IEnergyHandler.class );
TestClass( cofh.api.energy.IEnergyConnection.class );
}
@Override

View file

@ -1,4 +1,5 @@
package appeng.integration.modules.helpers;
import net.minecraftforge.common.util.ForgeDirection;
import cofh.api.energy.IEnergyHandler;
@ -29,15 +30,10 @@ public class NullRFHandler implements IEnergyHandler
return 0;
}
@Deprecated
public boolean canInterface(ForgeDirection from)
@Override
public boolean canConnectEnergy(ForgeDirection from)
{
return true;
}
@Override
public boolean canConnectEnergy(ForgeDirection from) {
return true;
}
}

View file

@ -236,7 +236,7 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
cachedTarget = true;
}
if ( outputTarget == null )
if ( outputTarget == null || !outputTarget.canConnectEnergy( side.getOpposite() ) )
return myNullHandler;
return outputTarget;
@ -244,14 +244,9 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
return myNullHandler;
}
@Deprecated
public boolean canInterface(ForgeDirection from)
@Override
public boolean canConnectEnergy(ForgeDirection from)
{
return true;
}
@Override
public boolean canConnectEnergy(ForgeDirection from) {
return true;
}
}

View file

@ -34,12 +34,6 @@ public abstract class RedstoneFlux extends RotaryCraft implements IEnergyHandler
return 0;
}
@Deprecated
final public boolean canInterface(ForgeDirection from)
{
return canConnectEnergy(from);
}
final public boolean canConnectEnergy(ForgeDirection from)
{
return internalCanAcceptPower && getPowerSides().contains( from );