This commit is contained in:
Rseifert 2012-07-22 07:00:49 -04:00
parent 0f051e6de9
commit 3c1a173070
3 changed files with 63 additions and 1 deletions

View file

@ -27,6 +27,7 @@ public class EntityRobot extends EntityCreature {
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 0;
return 1;
}
}

View file

@ -0,0 +1,33 @@
package net.minecraft.src.eui.pipes.api;
public interface ILiquidConsumer
{
/**
* onRecieveLiquid
* @param vol - The amount this block received.
* @param side - The side of the block in which the liquid came from.
* @parm type - The type of liquid being received
* @return vol - The amount liquid that can't be recieved
*/
public int onReceiveLiquid(int type, int vol, byte side);
/**
* You can use this to check if a pipe can connect to this liquid consumer to properly render the graphics
* @param side - The side in which the electricity is coming from.
* @parm type - The type of liquid
* @return Returns true or false if this consumer can receive electricity at this given tick or moment.
*/
public boolean canRecieveLiquid(int type, byte side);
/**
* @return Return the stored liquid of type in this consumer.
*/
public int getStoredLiquid(int type);
/**
* @return Return the maximum amount of stored liquid this consumer can get.
*/
public int getLiquidCapacity(int type);
}

View file

@ -0,0 +1,28 @@
package net.minecraft.src.eui.pipes.api;
/**
* The UEIProducer interface is an interface that must be applied to all tile entities that can produce electricity.
* @author Calclavia
*
*/
public interface ILiquidProducer
{
/**
* onProduceLiquid
* block.
* @param type - the type of liquid
* @param maxvol - The maximum vol or requested volume
* @param side - The side
* @return vol - Return a vol of liquid type that is produced
*/
public int onProduceLiquid(int type, int maxVol, int side);
/**
* canProduceLiquid
* block.
* @param type - the type of liquid
* @param side - The side
* @return boolean - True if can, false if can't produce liquid of type or on that side
* Also used for connection rules of pipes'
*/
public boolean canProduceLiquid(int type, byte side);
}