mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
updated to UE 3.1 api, closes #122
This commit is contained in:
parent
f2b128b3fb
commit
949b0c0023
@ -24,6 +24,8 @@ import universalelectricity.api.energy.{IEnergyContainer, IEnergyInterface}
|
||||
abstract class PowerConverterBase extends TileEntity with network.Environment with IEnergyInterface with IEnergyContainer {
|
||||
override def node: Connector
|
||||
|
||||
override def canConnect(direction: ForgeDirection, source: AnyRef) = direction != null && direction != ForgeDirection.UNKNOWN
|
||||
|
||||
override def onReceiveEnergy(from: ForgeDirection, receive: Long, doReceive: Boolean) = {
|
||||
if (!Settings.get.ignorePower && node != null) {
|
||||
val energy = fromUE(receive)
|
||||
@ -63,8 +65,6 @@ class PowerConverter extends PowerConverterBase with Analyzable {
|
||||
|
||||
override def onAnalyze(player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = null
|
||||
|
||||
override def canConnect(direction: ForgeDirection) = direction != null && direction != ForgeDirection.UNKNOWN
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
override def updateEntity() {
|
||||
|
@ -9,10 +9,11 @@ import net.minecraftforge.common.ForgeDirection;
|
||||
public interface IConnectable
|
||||
{
|
||||
/**
|
||||
* Can this TileEntity connect with another?
|
||||
* Can this object connect with another?
|
||||
*
|
||||
* @param from - The direction the connection is coming from.
|
||||
* @param source - The source calling canConnect onto this object.
|
||||
* @return Return true, if the connection is possible.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean canConnect(ForgeDirection direction);
|
||||
public boolean canConnect(ForgeDirection from, Object source);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user