Moved this over from FM
This commit is contained in:
parent
6d437b9f1e
commit
3630324a2f
1 changed files with 35 additions and 0 deletions
35
src/dark/api/energy/IForceDevice.java
Normal file
35
src/dark/api/energy/IForceDevice.java
Normal file
|
@ -0,0 +1,35 @@
|
|||
package dark.api.energy;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import dark.api.parts.ITileConnector;
|
||||
|
||||
/** Think of this in the same way as an electrical device from UE. getforce methods are designed to
|
||||
* get the idea amount of force that a side should be outputting at the time. Apply force is the
|
||||
* input for force for the tile, and should return the actually force the machine is using. Supply
|
||||
* is when the code asks for your tile to output force on the side, just return the force value
|
||||
* don't try to apply the force to other machines.
|
||||
*
|
||||
* Tip Supply should never equal load as everything will stop moving since your need more force to
|
||||
* move an object than it creates as a load, 100Power - 100Load = 0Force/0Movement. The supply of
|
||||
* force should be greater than the load required to do the work
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IForceDevice extends ITileConnector
|
||||
{
|
||||
/** Applies force to this tile
|
||||
*
|
||||
* @param side - side its coming from
|
||||
* @param force - amount of force
|
||||
* @return amount of force actually loaded down */
|
||||
public float applyForce(ForgeDirection side, float force);
|
||||
|
||||
/** @param side - side that force should be supplied in
|
||||
* @return force to apply in direction */
|
||||
public float supplyForce(ForgeDirection side);
|
||||
|
||||
/** Idea force to output on the given side. */
|
||||
public float getForceOut(ForgeDirection side);
|
||||
|
||||
/** Idea force to load down on the given side */
|
||||
public float getForceLoad(ForgeDirection side);
|
||||
}
|
Loading…
Add table
Reference in a new issue