Added some contructors to TileEntityMachine

Mainly an easier way to set watt per tick, and max power stored.
This commit is contained in:
DarkGuardsman 2013-07-29 03:35:29 -04:00
parent 8e5e42d7bf
commit 390562876c
3 changed files with 33 additions and 0 deletions

View file

@ -39,6 +39,23 @@ public abstract class TileEntityMachine extends TileEntityUniversalElectrical im
protected boolean unpowered, running;
public TileEntityMachine()
{
}
public TileEntityMachine(float wattsPerTick)
{
this.WATTS_PER_TICK = wattsPerTick;
this.MAX_WATTS = wattsPerTick * 20;
}
public TileEntityMachine(float wattsPerTick, float maxEnergy)
{
this.WATTS_PER_TICK = wattsPerTick;
this.MAX_WATTS = maxEnergy;
}
@Override
public void updateEntity()
{

View file

@ -52,6 +52,21 @@ public abstract class TileEntityTerminal extends TileEntityMachine implements IS
public final Set<EntityPlayer> playersUsing = new HashSet<EntityPlayer>();
public TileEntityTerminal()
{
super(0, 0);
}
public TileEntityTerminal(float wattsPerTick)
{
super(wattsPerTick);
}
public TileEntityTerminal(float wattsPerTick, float maxEnergy)
{
super(wattsPerTick, maxEnergy);
}
@Override
public void updateEntity()
{

View file

@ -5,6 +5,7 @@ import dark.core.blocks.TileEntityMachine;
public class TileEntityLaserEmitter extends TileEntityMachine
{
/** Facing direction of the tile and not the laser */
public ForgeDirection getFacingDirection()
{