Nerfed power costs for some machines

Most machines are 1J/t now since they are highly inactive per tick.
Though a few machines now have activation energy to do there tasks.
This commit is contained in:
DarkGuardsman 2013-10-27 05:37:38 -04:00
parent d9df7a6d78
commit e6d6a3208c
5 changed files with 20 additions and 5 deletions

View file

@ -109,13 +109,14 @@ public class NetworkAssembly extends NetworkSharedPower
if (part instanceof TileEntityAssembly)
{
currentDemand += ((TileEntityAssembly) part).getWattLoad();
currentDemand += ((TileEntityAssembly) part).getExtraLoad();
}
}
lastDemandPCalcTime = time;
lastNetPartsDemand = currentDemand;
//TODO calculate average
return currentDemand;
return currentDemand * 2;
}
public float getDemandTile(TileEntity te)

View file

@ -17,7 +17,7 @@ import dark.core.prefab.tilenetwork.NetworkTileEntities;
/** A class to be inherited by all machines on the assembly line. This class acts as a single peace
* in a network of similar tiles allowing all to share power from one or more sources
*
*
* @author DarkGuardsman */
public abstract class TileEntityAssembly extends TileEntityEnergyMachine implements INetworkEnergyPart
{
@ -142,7 +142,12 @@ public abstract class TileEntityAssembly extends TileEntityEnergyMachine impleme
/** Amount of energy this tile runs on per tick */
public double getWattLoad()
{
return .1;//100w
return .001;//1J/t or 20J/t
}
public double getExtraLoad()
{
return .001;//1J/t or 20J/t
}
@Override

View file

@ -33,7 +33,7 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
public TileEntityManipulator()
{
super(.1f);
super(.01f);
}
@Override
@ -81,6 +81,7 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
/** output location facing */
Vector3 outputPosition = new Vector3(this);
outputPosition.modifyPositionFromSide(this.getDirection().getOpposite());
this.consumePower(.001f, true);
/** Prevents manipulators from spamming and duping items. */
if (outputPosition.getTileEntity(this.worldObj) instanceof TileEntityManipulator)
@ -141,6 +142,8 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
/** output location facing */
Vector3 outputPosition = new Vector3(this).modifyPositionFromSide(this.getDirection());
this.consumePower(.001f, true);
ItemStack itemStack = invHelper().tryGrabFromPosition(inputUp, ForgeDirection.UP, 1);
if (itemStack == null)
@ -265,4 +268,9 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
{
this.setOutput(!this.isOutput());
}
public double getExtraLoad()
{
return .01;//1J/t or 20J/t
}
}

View file

@ -76,6 +76,7 @@ public class TileEntityRejector extends TileEntityFilterable
entity.motionX = side.offsetX * 0.1;
entity.motionY += 0.10000000298023224D;
entity.motionZ = side.offsetZ * 0.1;
this.consumePower(.001f, true);
if (!this.worldObj.isRemote && tileEntity instanceof IBelt)
{

View file

@ -23,7 +23,7 @@ import dark.core.common.DarkMain;
import dark.core.network.PacketHandler;
/** Conveyer belt TileEntity that allows entities of all kinds to be moved
*
*
* @author DarkGuardsman */
public class TileEntityConveyorBelt extends TileEntityAssembly implements IBelt, IRotatable
{