2014-11-22 16:03:47 +01:00
|
|
|
package resonantinduction.mechanical.mech.process.grinder
|
|
|
|
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection
|
|
|
|
import resonantinduction.core.interfaces.TNodeMechanical
|
|
|
|
import resonantinduction.mechanical.mech.grid.NodeMechanical
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Calclavia
|
|
|
|
*/
|
|
|
|
class NodeGrinder(parent: TileGrindingWheel) extends NodeMechanical(parent: TileGrindingWheel)
|
|
|
|
{
|
2014-11-23 04:59:44 +01:00
|
|
|
override def getLoad = 1000d * angularVelocity
|
2014-11-23 03:05:04 +01:00
|
|
|
|
2014-11-22 16:03:47 +01:00
|
|
|
override def canConnect[B <: NodeMechanical](other: B, from: ForgeDirection): Boolean =
|
|
|
|
{
|
|
|
|
if (parent.getDirection == ForgeDirection.UP || parent.getDirection == ForgeDirection.DOWN)
|
|
|
|
{
|
|
|
|
return parent.getDirection == from || parent.getDirection.getOpposite == from
|
|
|
|
}
|
2014-11-29 09:34:09 +01:00
|
|
|
|
2014-11-22 16:03:47 +01:00
|
|
|
return parent.getDirection != from && parent.getDirection.getOpposite != from
|
|
|
|
}
|
|
|
|
|
2014-11-29 09:34:09 +01:00
|
|
|
override def inverseRotation(other: TNodeMechanical) = (toVector3 - other.asInstanceOf[NodeMechanical].toVector3).toArray.sum < 0
|
2014-11-22 16:03:47 +01:00
|
|
|
}
|