try to fix energy issues again
fix issue with voiding p2p parts when shift-right clicking with a memory card
This commit is contained in:
+4
-5
@@ -191,6 +191,10 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
@Override
|
||||
public void onUpdateTick()
|
||||
{
|
||||
if( localStorage.stored < MAX_BUFFER_STORAGE - 0.001 )
|
||||
{
|
||||
this.myGrid.postEvent( new MENetworkPowerStorage( localStorage, PowerEventType.REQUEST_POWER ) );
|
||||
}
|
||||
if( !this.interests.isEmpty() )
|
||||
{
|
||||
final double oldPower = this.lastStoredPower;
|
||||
@@ -833,11 +837,6 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
{
|
||||
this.stored -= amount;
|
||||
|
||||
if( this.stored < MAX_BUFFER_STORAGE - 0.001 )
|
||||
{
|
||||
EnergyGridCache.this.myGrid.postEvent( new MENetworkPowerStorage( this, PowerEventType.REQUEST_POWER ) );
|
||||
}
|
||||
|
||||
if( this.stored < 0.01 )
|
||||
{
|
||||
EnergyGridCache.this.ticksSinceHasPowerChange = 0;
|
||||
|
||||
Reference in New Issue
Block a user