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:
parent
b873cb2cb1
commit
8abbab4077
6 changed files with 43 additions and 15 deletions
|
@ -12,8 +12,6 @@ public interface IForce
|
||||||
*/
|
*/
|
||||||
public int getForceSide(ForgeDirection side);
|
public int getForceSide(ForgeDirection side);
|
||||||
|
|
||||||
public int getForce();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param side
|
* @param side
|
||||||
|
|
15
src/minecraft/fluidmech/api/mech/IForceLoad.java
Normal file
15
src/minecraft/fluidmech/api/mech/IForceLoad.java
Normal 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);
|
||||||
|
}
|
20
src/minecraft/fluidmech/api/mech/IForceProvider.java
Normal file
20
src/minecraft/fluidmech/api/mech/IForceProvider.java
Normal 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);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package fluidmech.api.mech;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
|
public interface IMechanicalConnector
|
||||||
|
{
|
||||||
|
public boolean canRodeConnect(ForgeDirection side);
|
||||||
|
}
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue