Change power "satisfaction" -> "status", use efficiency() in blocks

This commit is contained in:
Anuken
2019-11-14 14:59:04 -05:00
parent c5a4d7331f
commit 30ea285ca0
23 changed files with 63 additions and 65 deletions
@@ -87,6 +87,11 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
return Time.delta() * timeScale;
}
/** Base efficiency. If this entity has non-buffered power, returns the power %, otherwise returns 1. */
public float efficiency(){
return power != null && !block.consumes.getPower().buffered ? power.status : 1f;
}
/** Call when nothing is happening to the entity. This increments the internal sleep timer. */
public void sleep(){
sleepTime += Time.delta();