Added more Mechanical api stuff

Not sure if i want to work on this right now as its just a bonus
addition to FluidMech a this point. Though it badly needs overhauled to
include its own pathfinder. The rods need to work as one rod using the
same pos, spin speed, Force, etc. As well math needs to be added to calc
force correctly
This commit is contained in:
Rseifert 2013-04-10 04:47:16 -04:00
parent b873cb2cb1
commit 8abbab4077
6 changed files with 43 additions and 15 deletions

View file

@ -12,8 +12,6 @@ public interface IForce
*/ */
public int getForceSide(ForgeDirection side); public int getForceSide(ForgeDirection side);
public int getForce();
/** /**
* *
* @param side * @param side

View file

@ -0,0 +1,15 @@
package fluidmech.api.mech;
import net.minecraftforge.common.ForgeDirection;
public interface IForceLoad
{
/**
*
* @param side
* @return if mechanical force can be inputed from this side
*/
public boolean canInputSide(ForgeDirection side);
public int applyForce(ForgeDirection side, int force);
}

View file

@ -0,0 +1,20 @@
package fluidmech.api.mech;
import net.minecraftforge.common.ForgeDirection;
public interface IForceProvider
{
/**
*
* @param side the rpm is coming from
* @return rpm that the block is running at
*/
public int getForceSide(ForgeDirection side);
/**
*
* @param side
* @return if mechanical force can be outputed from this side
*/
public boolean canOutputSide(ForgeDirection side);
}

View file

@ -0,0 +1,8 @@
package fluidmech.api.mech;
import net.minecraftforge.common.ForgeDirection;
public interface IMechanicalConnector
{
public boolean canRodeConnect(ForgeDirection side);
}

View file

@ -198,12 +198,6 @@ public class TileEntityGenerator extends TileEntityElectrical implements IPacket
return 0; return 0;
} }
@Override
public int getForce()
{
return this.force;
}
@Override @Override
public boolean canOutputSide(ForgeDirection side) public boolean canOutputSide(ForgeDirection side)
{ {

View file

@ -116,13 +116,6 @@ public class TileEntityRod extends TileEntity implements IPacketReceiver, IForce
return this.pos; return this.pos;
} }
@Override
public int getForce()
{
// TODO Auto-generated method stub
return this.currentForce;
}
@Override @Override
public String getMeterReading(EntityPlayer user, ForgeDirection side) public String getMeterReading(EntityPlayer user, ForgeDirection side)
{ {