Removed Old RF Api.
This commit is contained in:
parent
5675f5c5fd
commit
98fc460da0
5 changed files with 22 additions and 26 deletions
|
@ -466,15 +466,25 @@ public class Registration
|
||||||
recipeHandler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );
|
recipeHandler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );
|
||||||
|
|
||||||
IPartHelper ph = AEApi.instance().partHelper();
|
IPartHelper ph = AEApi.instance().partHelper();
|
||||||
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" );
|
ph.registerNewLayer( "appeng.api.parts.layers.LayerISidedInventory", "net.minecraft.inventory.ISidedInventory" );
|
||||||
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" );
|
ph.registerNewLayer( "appeng.api.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
|
||||||
ph.registerNewLayer( "appeng.api.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyHandler" );
|
|
||||||
ph.registerNewLayer( "appeng.api.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
|
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" );
|
||||||
|
}
|
||||||
|
|
||||||
|
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" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( AppEng.instance.isIntegrationEnabled( "RF" ) )
|
||||||
|
ph.registerNewLayer( "appeng.api.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyHandler" );
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register( TickHandler.instance );
|
FMLCommonHandler.instance().bus().register( TickHandler.instance );
|
||||||
MinecraftForge.EVENT_BUS.register( new PartPlacement() );
|
MinecraftForge.EVENT_BUS.register( new PartPlacement() );
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class RF extends BaseModule implements IIntegrationModule
|
||||||
|
|
||||||
public RF() {
|
public RF() {
|
||||||
TestClass( cofh.api.energy.IEnergyHandler.class );
|
TestClass( cofh.api.energy.IEnergyHandler.class );
|
||||||
|
TestClass( cofh.api.energy.IEnergyConnection.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package appeng.integration.modules.helpers;
|
package appeng.integration.modules.helpers;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import cofh.api.energy.IEnergyHandler;
|
import cofh.api.energy.IEnergyHandler;
|
||||||
|
|
||||||
|
@ -29,15 +30,10 @@ public class NullRFHandler implements IEnergyHandler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Override
|
||||||
public boolean canInterface(ForgeDirection from)
|
public boolean canConnectEnergy(ForgeDirection from)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnectEnergy(ForgeDirection from) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
|
||||||
cachedTarget = true;
|
cachedTarget = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( outputTarget == null )
|
if ( outputTarget == null || !outputTarget.canConnectEnergy( side.getOpposite() ) )
|
||||||
return myNullHandler;
|
return myNullHandler;
|
||||||
|
|
||||||
return outputTarget;
|
return outputTarget;
|
||||||
|
@ -244,14 +244,9 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
|
||||||
return myNullHandler;
|
return myNullHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Override
|
||||||
public boolean canInterface(ForgeDirection from)
|
public boolean canConnectEnergy(ForgeDirection from)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnectEnergy(ForgeDirection from) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,12 +34,6 @@ public abstract class RedstoneFlux extends RotaryCraft implements IEnergyHandler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
final public boolean canInterface(ForgeDirection from)
|
|
||||||
{
|
|
||||||
return canConnectEnergy(from);
|
|
||||||
}
|
|
||||||
|
|
||||||
final public boolean canConnectEnergy(ForgeDirection from)
|
final public boolean canConnectEnergy(ForgeDirection from)
|
||||||
{
|
{
|
||||||
return internalCanAcceptPower && getPowerSides().contains( from );
|
return internalCanAcceptPower && getPowerSides().contains( from );
|
||||||
|
|
Loading…
Reference in a new issue