Adds a debug generator for ForgeEnergy. (#3259)
* Adds a debug generator for ForgeEnergy. This adds a simple debug block to test external energy injection via ForgeEnergy and not rely solely on creative cells. The energy has two functions. The first is acting as an infinite ForgEnergy battery, this is unused by AE2 itself as nothing pulls energy. The second one is injecting energy every tick into any adjacent block accepting ForgeEnergy. The base generation is 8 per tick, but this is increased by the power of adjacent TileEnergyGenerators.
This commit is contained in:
+9
-5
@@ -336,10 +336,7 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
@Override
|
||||
public double injectProviderPower( double amt, final Actionable mode )
|
||||
{
|
||||
if( mode == Actionable.MODULATE )
|
||||
{
|
||||
this.tickInjectionPerTick += amt;
|
||||
}
|
||||
final double originalAmount = amt;
|
||||
|
||||
final Iterator<IAEPowerStorage> it = this.requesters.iterator();
|
||||
|
||||
@@ -354,7 +351,14 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
}
|
||||
}
|
||||
|
||||
return Math.max( 0.0, amt );
|
||||
final double overflow = Math.max( 0.0, amt );
|
||||
|
||||
if( mode == Actionable.MODULATE )
|
||||
{
|
||||
this.tickInjectionPerTick += originalAmount - overflow;
|
||||
}
|
||||
|
||||
return overflow;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user