electrodynamics/src/main/scala/edx/mechanical/mech/process/grinder/NodeGrinder.scala

21 lines
965 B
Scala
Raw Normal View History

2015-01-14 12:06:03 +01:00
package edx.mechanical.mech.process.grinder
2014-11-22 16:03:47 +01:00
2015-01-14 12:06:03 +01:00
import edx.core.interfaces.TNodeMechanical
import edx.mechanical.mech.gear.NodeGear
import edx.mechanical.mech.grid.NodeMechanical
2014-11-22 16:03:47 +01:00
import net.minecraftforge.common.util.ForgeDirection
/**
* @author Calclavia
*/
class NodeGrinder(parent: TileGrindingWheel) extends NodeMechanical(parent: TileGrindingWheel)
{
override def inertia = 1000d * Math.abs(angularVelocity)
2014-11-23 03:05:04 +01:00
override def canConnect[B <: NodeMechanical](other: B, from: ForgeDirection): Boolean = parent.getDirection == from || parent.getDirection.getOpposite == from
2014-11-29 09:34:09 +01:00
2021-04-05 14:41:30 +02:00
override def inverseRotation(other: TNodeMechanical): Boolean = if (other.isInstanceOf[NodeGear]) (toVectorWorld - other.asInstanceOf[NodeMechanical].toVectorWorld).toArray.sum < 0 else false
2014-11-22 16:03:47 +01:00
2021-04-05 14:41:30 +02:00
override def inverseNext(other: TNodeMechanical): Boolean = if (other.isInstanceOf[NodeGear]) (toVectorWorld - other.asInstanceOf[NodeMechanical].toVectorWorld).toArray.sum < 0 else false
}