public static class PowerHandler.PerditionCalculator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_POWERLOSS |
static float |
MIN_POWERLOSS |
| Constructor and Description |
|---|
PowerHandler.PerditionCalculator() |
PowerHandler.PerditionCalculator(double powerLoss)
Simple constructor for simple Perdition per tick.
|
| Modifier and Type | Method and Description |
|---|---|
double |
applyPerdition(PowerHandler powerHandler,
double current,
long ticksPassed)
Apply the perdition algorithm to the current stored energy.
|
double |
getTaxPercent()
Taxes a flat rate on all incoming power.
|
public static final float DEFAULT_POWERLOSS
public static final float MIN_POWERLOSS
public PowerHandler.PerditionCalculator()
public PowerHandler.PerditionCalculator(double powerLoss)
powerLoss - power loss per tickpublic double applyPerdition(PowerHandler powerHandler, double current, long ticksPassed)
powerHandler - the PowerHandler requesting the perdition updatecurrent - the current stored energyticksPassed - ticks since the last time this function was calledpublic double getTaxPercent()